Re: SQL Syntax..?

From: Date: Wed, 12 Jul 2000 19:52:14 +0000
Subject: Re: SQL Syntax..?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-6247@lists.php.net to get a copy of this message
At 14:49 11.07.00 -0500, you wrote:
Hey all. ,messages.message,SUBSTRING(messages.message,IF((INSTR(messages.message,'".addslashes($phrase)."')-12)<0,INSTR(messages.message,'".addslashes($phrase)."')-12,0),".(strlen(addslashes($phrase))+24).") as a_message, That's just an extract from an SQL query I'm sending to MySQL. However, when I try to access $row["a_message"]; , it returns nothing. What I'm attempting to do is grab a portion of the first match in a message that contains the string to search for, and display that on the search results. I think you try to have the sql-staement do some logical action, as this is
only a "command" send to the sql-parser, it wouldn´t understand. Try to workout your final request on the database with a sql-command which is made from earlieer requests. g´s Oliver

« previous php.general (#6247) next »