lol, yeah as I was reading your post I basically slammed my hand onto my
forehead and yelped "doh!". Yeah, that seems like a no-brainer solution.
LOL. Oh man.

In response to Bill's suggestion, the fields aren't that big. I am indeed
using MyISAM and plan to index it using FULLTEXT.

Thanks,

-----
David D.


On Fri, Aug 22, 2008 at 3:17 PM, enportugal <[EMAIL PROTECTED]> 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Using-quote%28%29-method-in-LIKE-statements-tp19113687p19113905.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>

Reply via email to