Home  >  Article  >  Backend Development  >  如何嵌套

如何嵌套

WBOY
WBOYOriginal
2016-06-13 10:11:30869browse

怎么嵌套?
本人菜鸟 PHP语言没看过··
主任叫我做个网址 现在差个 链接跳转··
   
  $id=$_GET["id"];
  $sql="select list from list where id=$id ";
  
  $query1=mysql_query($sql);
  $slq1="select content from $query ";
  $query=mysql_query($sql1);
  
  while($array=mysql_fetch_array($query)){
  ?>
后面不写了

运行说SLQ1没定义··
$slq1="select content from $query ";
$query该如何写 求教了·

------解决方案--------------------
$sql="select list from list where id=".$id;

这样不可以么?
------解决方案--------------------
$slq1="select content from $query ";
$query=mysql_query($sql1);

变量名写错了。

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