This is more of a SQL question than a PHP one but I'm using PHP so I posted here. I'm fairly new to SQL and web programming in general. I have a 10 column DB with a few thousand rows. Right now I have a simple PHP page where you can enter a phone number to search the records.
This works fine, but I would like the user to be able to input any search term in this one box, and have it search all columns. So no matter if they enter a phone number, a name, or an address, the record will still be found. What is the best way to do this?Code:$query = 'SELECT * FROM data WHERE phone="'.$phone.'"';




Reply With Quote