致命错误:调用未定义的函数mysqli_master_query()

时间:2013-03-28 08:28:39

标签: php mysql mysqli

查询数据库时遇到问题。我收到以下错误:

Fatal error: Call to undefined function mysqli_master_query() in /home/**/**/**/edit/add.php on line 4

这是我的PHP代码..

<?php
    $db = mysqli_connect("localhost","XXX","XXX","XXX") or die(mysql_error());

    if(mysqli_master_query($db, "UPDATE users SET order =1 WHERE id =1")){
        echo "Y";
    }else{
        echo "N";
    }
?>

2 个答案:

答案 0 :(得分:1)

mysqli_master_query()

 This function has been DEPRECATED and REMOVED as of PHP 5.3.0.

答案 1 :(得分:0)

您使用的是哪个版本?

截至PHP 5.3.0,

mysqli_master_query()函数已被弃用和删除。

参考:http://php.net/manual/en/function.mysqli-master-query.php