I have a SQL l statement in my model,
I then say:
$query = $this->db->query($sql, array(fields, fields1);
if ($query) {
    return true:
} else {
    echo "failed";
    return false;
}
How can I get PHP to output the precise SQL statement that is being submitted to my database as my query always fails? then show that on my php view, page.