I'm learning about MySQL prepare statement and when I run the following code, I get the PHP Fatal error: Uncaught Error: Call to undefined function mysql_close(). The output is correct and I just can't figure out why such an error occurs. Thanks for your time!
$conn3 = new mysqli(DB_HOST,DB_USERNAME,DB_PASSWORD,DB_NAME);
$event_type = $jarray['event_type'];
$key = "submission";
$search = $conn3->prepare("SELECT * FROM metadb USE INDEX(field_id) WHERE event_type = ? AND event_field = ?");
$search->bind_param('ss', $event_type, $key);
$search->execute();
$search->store_result();
echo $search->num_rows;
mysql_close($conn3);