user2498443
user2498443

Reputation: 153

MySQLi exits without error

$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();

This outputs none of the tests. What am I missing? I have tried changing the param function but no success, I am sure I am missing something trivial.

Upvotes: 0

Views: 109

Answers (1)

Kylie
Kylie

Reputation: 11749

Are you sure mysqli is enabled?

Check php.ini and uncomment (ie remove ;) this line....

;mysqli.dll

To...

mysqli.dll   (mysqli.so on linux)

Upvotes: 1

Related Questions