Home >Backend Development >PHP Tutorial > php新手 想问PHP MYSQL传值有关问题。非常菜的有关问题

php新手 想问PHP MYSQL传值有关问题。非常菜的有关问题

WBOY
WBOYOriginal
2016-06-13 13:23:161277browse

php新手 想问PHP MYSQL传值问题。非常菜的问题!
$query= "SELECT name from table where id =_$POST[$id]";
$result = mysql_query( $query);
echo $result;

我只是想得到 id为 $id的 所有 name...

新手! 还望指教!

------解决方案--------------------
$query_CN = "SELECT `Pestcide_trade_name`,`Company_name` from insecticide where `Company_name`='{$TradeName}';";

单引号放外面

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn