pro_php thread: LIKE search not working..
ooppps!!!
Sorry the correct is...
$sql = "SELECT name, gcsn, mcount, timeperiod, alignment,dice FROM
$table_name
WHERE name like '%".$gname."%' ";
LM
----- Original Message -----
From: <luismorales@j...>
To: "professional php" <pro_php@p...>
Sent: Friday, August 02, 2002 8:45 PM
Subject: [pro_php] Re: LIKE search not working..
> try with
>
> $sql = "SELECT name, gcsn, mcount, timeperiod, alignment,dice FROM
$table_name
> WHERE name = '%".$gname."%' ";
>
> LM
>
> Quoting Empier4552@a...:
>
> > Hey. Im trying to do a like search and below is my basic query.
> >
> > $sql = "SELECT name, gcsn, mcount, timeperiod, alignment, dice
> > FROM $table_name WHERE name LIKE \"$gname\"
> > ";
> >
> > However when i submit the page is blank.
> >
> > BUT if I use : $sql = "SELECT name, gcsn, mcount, timeperiod, alignment,
> > dice
> > FROM $table_name WHERE name = \"$gname\"
> > ";
> >
> > I get the exact match up fine.
> >
> > I have several names all varying in similarity. Test, Tes3t, Test3,
3test,
> > Test390, Testt, Tester, Testing etc those sorts of things. I put in
search
> > words like Tes, and Test but i always get a blank result when doing a
LIKE
> > Search. in the WHere name = \"$gname\" search if i put in the exact name
it
> >
> > finds it with ease. Any one know where im going wrong here?
> >
> >
> >
>
>
>
>