On Sun, 17 Mar 2002, Daniel Negron/KBE wrote:
>      $sql= "SELECT * FROM cd_list WHERE $searchstring LIKE '%searchstring%'
> ORDER BY artist ASC";

How about:

   SELECT * FROM cd_list WHERE searchstring LIKE '%{$searchstring}%' 

Then again, do you actually have a column called "searchstring" in your 
table? 

In any case, the way you had it didn't seem to make much sense unless you 
wanted to search a user-supplied column for a string that literally 
contained the string "searchstring".

miguel


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to