Hi there!
How can I check if $input isin field "xxx" (in any rows)? "if($input isin table "xxx" (in any rows)) { blabla }"
Searching through a MySQL db
Moderator: General Moderators
Re: Searching through a MySQL db
you do a mysql query like:
Code: Select all
$fieldQuery = mysql_query("SELECT field FROM table WHERE field LIKE '%xxx%'") or die(mysql_error());
if(mysql_num_rows($fieldQuery) > 0)
{
print "Match Found";
}
else
{
print "Match not found";
}