[!--quoteo(post=377774:date=May 28 2006, 03:36 AM:name=valleydr)--][div class=\'quotetop\']QUOTE(valleydr @ May 28 2006, 03:36 AM)
Hello. I am somewhat familiar with php, I am learning more as I go. I have come up with an issue I can't figure out. I am setting up a script that uses a search form that searches a mysql db for the keyword and show the results. I have it set up to search a specific field in the db, but I want it to search more than one. what I have so far is:
$keyword = "";
$keyword = $HTTP_GET_VARS["keyword"];
$filterKeyword = "AND (c.features LIKE '%$keyword%' OR '$keyword'='')";
keyword is the text box from the form, and c.features is the field it is currently searching from the c table. This works, but what I need is for it to basically search c.features and c.engine and c.drive, etc. For whatever reason, i cannot figure out the correct formatting for this. I'd appreciate any help I can get. Thanks.
If you are using MySQL then try use the array mysql_fetch_assoc() function.
You can use it to search several columns, tables etc and then store that in an array