且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

警告:mysql_result()[function.mysql-result]:无法跳到第11行的profile.php中MySQL结果索引5的第0行

更新时间:2023-02-24 08:00:25

此警告表示$imageresult变量中没有行.检查一下,这应该可以工作:

This warning means that there is no row in the $imageresult var. Check it out, this should work:

$imageresult = mysql_query("SELECT name FROM imagetable WHERE id = '$id'") or die(mysql_error());
if (mysql_num_rows($imageresult) > 0) {
  $u = mysql_result($imageresult, 0 ,"name") or die(mysql_error());
  if (isset($id) && (!isset($u))) {
  }
}