note 7726 added to mysql_query

From: Date: Sat, 12 Aug 2000 14:19:44 +0000
Subject: note 7726 added to mysql_query
Groups: php.notes 
Request: Send a blank email to php-notes+get-1492@lists.php.net to get a copy of this message
hello there... I need some help with mysql_query. check this out: mysql_query("SELECT * FROM my_table WHERE name LIKE $search") now.. if $search="sometext" I get an error, but when $search="123" the query works. how can I get this to work: mysql_query("SELECT * FROM my_table WHERE name LIKE '$search'") or should I use something else ?? http://www.php.net/manual/function.mysql-query.php

« previous php.notes (#1492) next »