Question

I am developing an internet site, using php 5.3, and mysql for database.

When using the database, after lines such as:

...

  $stmnt = $mysqli->prepare("Select ID from users where loginid = ?");
    $stmnt->bind_param('i', $x);
    $stmnt->execute();
    $result = $stmnt->get_result();

is there any equivalent command for : $stmnt->get_result();

This is because I am using phplint (http://www.icosaedro.it/phplint/phplint-on-line.html) and I get a compilation error : ERROR: the method mysqli_stmt::get_result() does not exist

Some workarround leads to conclusion that some server doesn't support $stmnt->get_result() (otherwise, I don't know why the code cannot be compiled).

Is there any equivalent to $stmnt->get_result()?

Thanks :)

Was it helpful?

Solution

Possibly

$stmt->fetch();

or

$result = $result->fetch_assoc();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top