Search with LIKE?!?!

admin

Administrator
Staff member
Haj,

I try to search in my MySQL "db" databse with something "like"the input with the following rules:

$srch = "'%$p%'";
$result = mysql_query("SELECT * FROM db WHERE keys LIKE $srch ORDER BY keys LIMIT $s, $e");

But this is'nt work. would it mind what kind of fields are in the MySQL database? VARCHAR, TEXT? or something else, is it important that there is a index on the fields?

Please help.

Grtz,
Fiore!
 
Back
Top