I bet you guys are sick of seeing this type of thread but i cant find the answer im looking for.
the query im using just now is as bellow
$for = str_replace(" ","|",$search);
$sql = "SELECT * FROM barcode WHERE (part REGEXP '$for') OR (description REGEXP '$for')";
$result = $db->query($sql);
example database is
code description
AC0013 LAMP TABLE SILVER SMALL
AC0008 BROOKLYN OAK NEST OF TABLES
if i search for "nest table" i will get the 2 results from about. how do i change my query so it would only display AC0008 BROOKLYN OAK NEST OF TABLES in aswell as me still being able to search my part.
this would need to work for searching with more than 2 words aswell.
Tia
Acemods