I used to code in php4 but now I switched to php5 and the following code throws the below exception. Why is that?
CODE:
$mysqli = new mysqli($CONFIG_DB_HOST,$CONFIG_DB_USERNAME,$CONFIG_DB_PASSWORD,$CONFIG_DB_NAME);
$result = $mysqli->query("select * from temp_table where url = '" . $mysqli->real_escape_string($in_url) . "'");
$row = $result->fetch_assoc();
$out_title = $row['title'];
Exception:
Fatal error: Call to a member function fetch_assoc() on a non-object in detail.php on line 13