I have the following code in "IndexController.php":
$sql = 'SELECT * FROM ?';
$stmt = new Zend_Db_Statement_Mysqli($db, $sql);
$this->view->projects = $stmt->execute(array('projects'));
... which is just used to retrieve all project objects from the database and pass them to the view. However when I run this code I get the following error:
Notice: Undefined variable: db in C:\wamp\www\PROJECTS_Zend\projectManager\application\controllers\IndexController.php on line 19
Fatal error: Call to a member function quoteIdentifier() on a non-object in C:\wamp\www\PROJECTS_Zend\projectManager\library\Zend\library\Zend\Db\Statement.php on line 181
I am not sure what variable db is, or what it should be, but if you have any information on this I would be greatful if you could enlighten me.
$dbobject?