View Single Post
  #6 (permalink)  
Old 07-12-05, 04:59 AM
the_mole001's Avatar
the_mole001 the_mole001 is offline
Newbie Coder
 
Join Date: Feb 2004
Location: Australia
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Hello There,

How about something that searches for the closest match using all the information given? Something like...

PHP Code:

$result=MYSQL_QUERY("SELECT * FROM hardware WHERE symptom LIKE '%$symptom%' AND manufacturer LIKE '%$manufacturer%'AND 

component LIKE '%
$component%' ORDER BY referance"
or die (
mysql_error()); 
The % character says that the word can appear after/before words and it looks for the closest match, so if the person enters 3 fields and leaves one black it is still searching for three items? Just an idea. Hope it helps
__________________
Current Project: GGAC Website
Project Link: http://peter.5gigs.com/
Reply With Quote