On Tue, Jul 21, 2009 at 1:20 PM, Miller, Terion<tmiller@xxxxxxxxxxxxxxxxxxxx> wrote: > Here it is...I see where it's doing the restaurant.name LIKE statement 2x which is prob messing it up right...but in the code why is it doing that twice.. > > SELECT name, address, inDate, inType, notes, critical, cviolations, noncritical FROM restaurants, inspections WHERE restaurants.name <> '' AND restaurant.ID = inspection.IDAND restaurants.name LIKE '%A%' AND restaurants.name LIKE '%A%' ORDER BY restaurants.name; > > It's not the multiple LIKE statements. It is the concatenation, like I said the last time. There is no white space between "inspection.ID" and "AND". You may indeed have problems with some of those repeated conditions on restaurants.name, but if so they will be performance issues resulting from table scans, and not the errors you are reporting. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php