...

View Full Version : Multiple select like



CloudWriter
12-29-2010, 03:50 AM
Im trying to do multiple %like and keeps crashing?



// Select records from database
$query = "SELECT * FROM customers WHERE Bus_Name like '%$trimmed%',
FirstName like '%$trimmed%' ORDER BY Bus_Name";

DataTalk
12-29-2010, 03:52 AM
you are missing OR!



WHERE Bus_Name like '%$trimmed%' OR FirstName like '%$trimmed%'
OR LastName like '%$trimmed%' OR SerialNo like '%$trimmed%'
ORDER BY Bus_Name";

CloudWriter
12-29-2010, 03:56 AM
you are missing OR!



WHERE Bus_Name like '%$trimmed%' OR FirstName like '%$trimmed%'
OR LastName like '%$trimmed%' OR SerialNo like '%$trimmed%'
ORDER BY Bus_Name";



Thanks, that works!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum