SQL Syntax..?

From: Date: Tue, 11 Jul 2000 19:49:59 +0000
Subject: SQL Syntax..?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5990@lists.php.net to get a copy of this message
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. Appreciate any help. CZ As Gregor Samsa awoke one morning from uneasy dreams he found himself transformed in his bed into a gigantic insect. Franz Kafka, The Metamorphosis

« previous php.general (#5990) next »