Re: [PHP-DB] Probably an easy question - blank search fields (PHP & MySQL)

2002-01-06 Thread Bogdan Stancescu
$result = mysql_query("select * from equipment where (category='$category') and (description like '%$description') and (roomloc='$roomloc') and (quantity like '%$quantity') and (serialno like '%$serialno') and (patdue like '%$patdue')",$db); Gary Smith wrote: > Hiya, I'm writing a backend

[PHP-DB] Probably an easy question - blank search fields (PHP & MySQL)

2002-01-06 Thread Gary Smith
Hiya, I'm writing a backend in MySQL with a PHP frontend. One of the PHP pages searches the database. The user can enter as many or as few fields as they like. I then search the database using this code: $result = mysql_query("select * from equipment where (category='$category') and (description