[eluser]danmontgomery[/eluser]
Any successful query will return a result, if there is a database error it will return FALSE.
Code:
$query = $this->db->query("SELECT * FROM ? WHERE id = ?");
if($query == FALSE) {
// Handle DB error
} else if($query->num_rows() == 0) {
// Handle successful query with no records returned
} else {
// Handle successful query with records returned
}