An easy Mysql question for an experienced programmer
Posted: Tue May 17, 2005 4:01 am
Hi,
I have the following code used for a search box to query my database;
I need to tweak it so that it incorporates a list box. Here is my tweaked code;
As you can see it used both $list and $search. When I echo this within my output script it shows up, but it doesnt appear to work for the query. I dont think mysql is recognising it..
Please help
I have the following code used for a search box to query my database;
Code: Select all
$result = mysql_query("SELECT * FROM dedicated WHERE customer LIKE '%$search%'");I need to tweak it so that it incorporates a list box. Here is my tweaked code;
Code: Select all
$result = mysql_query("SELECT * FROM dedicated WHERE '%$list%' LIKE '%$search%'");As you can see it used both $list and $search. When I echo this within my output script it shows up, but it doesnt appear to work for the query. I dont think mysql is recognising it..
Please help