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 LIKE '%" . $keyword . "%' OR
JB> field_2 LIKE '%" . $keyword . "%' OR field_3 LIKE '%" . $keyword . "%')
JB> AND 
JB> status = 'active'";

JB> The single quoted variables do not get parsed

JB> --
JB> PHP General Mailing List (http://www.php.net/)
JB> To unsubscribe, visit: http://www.php.net/unsub.php


They do if they are themselves inside double quotes :)

echo "'$var'"; will get parsed ok

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to