Won't this escape the wildcard character, and offer it as a literal?
enportugal wrote:
HI, Put the % signal inside the quote funciton Like this WHERE B.Name LIKE " . $db->quote('%'.$_GET['name'].'%') . " Regards, David Di Biase wrote:Hi there, I was wondering how it might be possible to use $db->quote() but within a LIKE statement. Here is my query: SELECT B.BidRequestID, B.Name, B.MinAmount, B.MaxAmount, B.BidRequestUniqueID, B.EndBid, B.Views, I.Name as IndustryName FROM BidRequests AS B INNER JOIN Industries AS I ON B.IndustryID = I.IndustryID WHERE B.Name LIKE '%scripting%' OR B.Description LIKE '%description%' I'm just using a basic $db->query() statement instead of the ->from ->where etc. method for now. I want to do something like: WHERE B.Name LIKE '%" . $db->quote($_GET['name']) . "%' OR B.Description LIKE '%" . $db->quote($_GET['description']) . "%' That would basically add an extra quote inside my % thus breaking the query. Thanks! David
