>I remember seeing someone post something like this:
>
>$sql = " SELECT * FROM table_name
>         WHERE towns LIKE \"$town\" ";
>
>so if the search word is not EXACTLY like a row in the database, it may
>return results to partial words.

I think you mean
$sql = "SELECT * FROM table_name WHERE towns LIKE \"%$town%\" ";

The % is more fuzzy. Look it up in the MySQL manual for more details 
on %. <http://www.mysql.com/doc/>

Kristofer
-- 
______________________________________

Kristofer Widholm
Web Pharmacy
[EMAIL PROTECTED]
191 Grand Street, Brooklyn  NY  11211
718.599.4893
______________________________________

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to