Reply to LIKE and variable (beginner)

Your name:

Reply:


Posted by stewartgriffin on 03/30/06 00:23

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

[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

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