I have the following code running on PHP server, but I am stuck with following issue
$stmt = $this->conn->prepare("SELECT * FROM vehicle_model");
$stmt->execute();
//grab a result set
$resultSet = $stmt->get_result();
//pull all results as an associative array
$result = $resultSet->fetch_all();
$stmt->close();
return $result;
I have created the connection like below
new mysqli(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME);
I am having PHP version 5.5.9 and Server type: MySQL
Error:
[Mon Apr 11 19:33:46.033855 2016] [:error] [pid 10259] [client 223.190.77.90:50531] PHP Fatal error: Call to undefined method mysqli_stmt::get_result() in /var/www/html/include/VehicleModelHandler.php on line 19
I am stuck for almost 2 hours if any one can point out what is happening wrong that would be a great help.