That method gets rid of your use of prepared statements. I would recommend you stick with prepared statements.
There are lots of examples on the PHP documentation pages:http://www.php.net/m....get-result.php
Look at Example #1. Also, reference the class synopsis to learn how to use its methods. In your case, all you have to do is call the "get_result()" method on your statement object:
/* Methods */
mysqli_result get_result ( void )
if ($stmt = $this->mysqli->prepare('SELECT * FROM `table` WHERE id=? LIMIT 1'))
// This line is what you were missing.
$result = $stmt->get_result();
// fetching all to object or associative array
while ($data = $result->fetch_assoc())
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid