if(shoptype=="$xuanze"){ $sql1=mysql_query("select count(*) as total from tb_members where shoptype='$search' order by mid"); }elseif(user=="$xuanze"){ $sql1=mysql_query("select count(*) as total from tb_members where user='$search' order by mid"); }elseif(shopname=="$xuanze"){ $sql1=mysql_query("select count(*) as total from tb_members where shopname='$search' order by mid"); }
if(shoptype=="$xuanze"){ $sql=mysql_query("select * from tb_members where shoptype='$search' order by mid limit ".($page-1)*$pagesize.",$pagesize"); }elseif(user=="$xuanze"){ $sql=mysql_query("select * from tb_members where user='$search' order by mid limit ".($page-1)*$pagesize.",$pagesize"); } elseif(shopname=="$xuanze"){ $sql=mysql_query("select * from tb_members where shopname='$search' order by mid limit ".($page-1)*$pagesize.",$pagesize"); }
これは出错の場所です 警告: mysql_fetch_array(): 指定された引数は、D:AppServwwwshihuiadminsearchshow.php の 33 行目にある有効な MySQL 結果リソースではありません
警告: mysql_fetch_ar ray(): 指定された引数は有効な MySQL 結果リソースではありませんD:AppServwwwshihuiadminsearchshow.php の行 70
讨论(解决方案)
ハンドル出力。
说明的询失了,返還询結果に問題があります、印刷查询语句分析次吧
}
if(shoptype=="$xuanze"){ $sql1=mysql_query("select count(*) as total from tb_members where shoptype='$search' order by mid"); }elseif(user=="$xuanze"){ $sql1=mysql_query("select count(*) as total from tb_members where user='$search' order by mid"); }elseif(shopname=="$xuanze"){ $sql1=mysql_query("select count(*) as total from tb_members where shopname='$search' order by mid"); } 条件出错了,$sql は空,正确如 if($search=="shopname")