|
Posted by Roger Dodger on 04/04/06 19:09
Stefan Rybacki wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Roger Dodger schrieb:
> > Try
> >
> > $query="SELECT * FROM restaurant_list WHERE rest_name LIKE
> > '%".$searchname."%' ";
> >
>
> Where is the difference to what the OP had?
>
> curious regards
> Stefan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.1 (MingW32)
>
> iD8DBQFEMfdSyeCLzp/JKjARAlnNAJwKZqhvB6BJHzleEnngBraKQ7nQYwCfQ7CG
> Ua0q78CQ1+b9adnnJhJahqM=
> =3naH
> -----END PGP SIGNATURE-----
To be honest, there really isn't a difference. However, when I cut and
pasted his code, it didn't work for me either. I made that change, and
then started receiving results. Strangely enough, when I reverted to
his original syntax, I STILL was receiving results. So I really don't
know what the problem was. I've found, though, that when dealing with
embedded single quotes and double quotes, it's just easier for me to
make explicit what I want to print out by using concatenation
operators. Personal preference really.
Navigation:
[Reply to this message]
|