0
$mysqli = new mysqli("localhost", $musername, $mpass, $mdatabase);
if ($mysqli->connect_errno) {
    printf("Connect failed: %s\n", $mysqli->connect_error);
    exit();
}
$sqquer = $mysqli->prepare('SELECT * FROM ? where id=?');
$sqquer->bind_param('is', $mtable, $_SESSION['User']['id']);
if ($sqquer==false) {
  echo "fail";
}
echo "<br>Test 2";
$sqquer->execute();
echo "<br>Test 3";
$sqquer->store_result();

这不会输出任何测试。我错过了什么?我尝试更改 param 函数但没有成功,我确信我错过了一些微不足道的东西。

4

1 回答 1

1

你确定启用了mysqli吗?

检查 php.ini 并取消注释(即删除;)这一行....

;mysqli.dll

至...

mysqli.dll   (mysqli.so on linux)
于 2013-06-26T23:15:55.080 回答