Reply to Re: LIKE and variable (beginner)

Your name:

Reply:


Posted by Stefan Rybacki on 03/31/06 06:34

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

stewartgriffin schrieb:
> hey all:
> wondering if something is wrong with my syntax
> when i use WHERE and =, and use a variable in php the code returns
> what i want but when i use a variable like below and type in a portion
> of a word it should find, nothing is returned
>
> here is code:
>
> $searchname = $_POST['searchname'];
>
> mysql_connect('mysql24.secureserver.net',$username,$password);
> @mysql_select_db($database) or die( "Unable to select database");
>
> $query="SELECT * FROM restaurant_list
> WHERE rest_name LIKE '%$searchname%'";
>
> thanks in advance
>

Well my cristal ball is broken.
More input please!

Regards
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)

iD8DBQFELKNUyeCLzp/JKjARAsRUAKCY/icrkB41k6gkx+RzOB25cm9uYQCeKCcr
7p19VbC0IyYePJpp9savObc=
=huQ1
-----END PGP SIGNATURE-----

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация