I followed steps in a tutorial to learn how to use Code Igniter to build a PHP/MySQL application and upon completion the application fails with no error. I'm using TextMate rather than a full featured IDE.
How do most developers using Code Igniter debug their applications? Is there something in the framework for bubbling errors and a stack trace into the browser session?
The specific problem I'd like to address now seems database related. I configured my database, setup autoload.php, and created a controller and model for handling table data, and a view for presenting it. From my accounts_model.php:
public function getData()
{
//Query the data table for every record and row
$query = $this->db->get('accounts');
if ($query->num_rows() > 0)
{
show_error('Database is empty!');
}
else
{
return $query->result();
}
}
When I run the application, I see "An Error was Encountered\nDatabase is empty!". Since I know the database is not empty and configuration is correct, I need something from the framework to give me a hint whether it is connecting to the database or why the query is empty.