Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Tom Rogers
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

RE: Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Jay Blanchard
[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

Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Richard Davey
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

Re[2]: [PHP] OK SQL experts...

2004-04-23 Thread Richard Davey
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