Hi,
Saturday, April 24, 2004, 1:55:36 AM, you wrote:
JB [snip]
JB SELECT * FROM 'my_table' WHERE ('field_1' LIKE '%$keyword%' OR
JB 'field_2' LIKE '%$keyword%' OR 'field_3' LIKE '%$keyword%') AND
JB 'status' = 'active';
JB [/snip]
JB *slaps forehead*
JB SELECT * FROM my_table WHERE (field_1
[snip]
They do if they are themselves inside double quotes :)
echo '$var'; will get parsed ok
[/snip]
I know, but since I saw no double quotes I had to go for the obvious. :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello Brian,
Friday, April 23, 2004, 5:02:00 PM, you wrote:
BD Yes, I actually did exactly that. Everything works until I have more
BD than one statement inside the (x LIKE x OR x LIKE x) parens. That's why
BD I figured there has to be something wrong with my paren structure. When
BD I RTFM I
Hello Brian,
Friday, April 23, 2004, 6:18:43 PM, you wrote:
BD You have an error in your SQL syntax. Check the manual that corresponds
BD to your MySQL server version for the right syntax to use near
BD ''my_table' WHERE ('field_1' LIKE '%%' OR 'field2'
my_table should NOT be quoted in this
4 matches
Mail list logo