警告:mysqli_query()期望参数1为mysqli,第19行的C:\ xampp \ htdocs \ rms \ database.php中给出的null

时间:2019-07-02 05:40:26

标签: php mysqli

  

警告:mysqli_query()期望参数1为mysqli,在第19行的C:\ xampp \ htdocs \ rms \ database.php中给出空值

     

警告:mysqli_error()期望参数1为mysqli,在第19行的C:\ xampp \ htdocs \ rms \ database.php中给定null * /

强文本

<?php
    class connectionMNGR
    {
        public function connect()
        {

             $dbConn = mysqli_connect("localhost","root","","reminder")or die ('MySQL connection failed. . . ');

        }
    }
    class SQL
    {
            function dbQuery($sql)

            {
                 global $dbConn;

                $result = mysqli_query($dbConn,$sql) or die(mysqli_error($dbConn));

                return $result;
            }

            function dbFetchAssoc($result)
            {
                return mysqli_fetch_assoc($result);
            }

            function dbFreeResult($result)
            {
                return mysqli_free_result($result);
            }

            function dbNumRows($result)
            {
                return mysqli_num_rows($result);
            }



    } // class SQL ends         
?>

0 个答案:

没有答案