MYSQLI警告:如何禁用它

时间:2013-08-11 18:52:59

标签: mysql mysqli warnings

对于我的php,我收到一条警告信息:

警告:mysqli_result :: fetch_array():无法在第11行的/var/www/scorebord/loader.php中获取mysqli_result

 <?php
//header("Refresh: 60; URL=loader.php");

  $db = new mysqli('localhost','root','wortel','score');
 if(mysqli_connect_errno()){
         echo mysqli_connect_error();
        }

 $result = $db->query("SELECT code FROM score.dash where id=1");

  while ($row = $result->fetch_array())
 {


                           switch ($row[0]) {
    case "0":
        include("buien.html");
        break;
    case "1":
        include("laatsteuur.php");
        break;
    case "2":
       include("ploegtotaal.php");
        break;
    case "3":
       include("gemsnelheid.php");
        break;
            }
        }

?>

include脚本运行appart verry wel

1 个答案:

答案 0 :(得分:0)

你有这个错误,因为你正在使用,而你不应该。