|
Posted by Sloane T. Irwin on 02/08/07 21:34
Hi,
I'm adding a search functionality to a newly created service request
database. I copied over pretty much all of the code from a previous,
currently working, inventory tracking database that I created. I
changed the field names and whether I wanted "LIKE" or =, but still,
all I get is a query failed message.
Can someone help please!!!
Query code is as follows:
$query = mysql_query("SELECT * FROM support
WHERE (first LIKE '%$searchfor%' OR last LIKE '%$searchfor%' OR
priority LIKE '%$searchfor%' OR inventory='$searchfor' OR owner LIKE '%
$searchfor%' OR building LIKE '%$searchfor%' OR room='$searchfor' OR
email LIKE '%$searchfor%' OR phone LIKE '%$searchfor%' OR issue LIKE '%
$searchfor%' OR c_id LIKE '%$searchfor%')",$db) or die ("Query
failed");
$numofrows = mysql_num_rows($query);
[Back to original message]
|