i have just finished my first site built with zend framework and all works great on my local machine.
then i uploaded it to the server (godaddy) and all works except any connection my models do with the database. i have made a connetion to the database with regular PDO with the credentials in my application.ini and it worked, and i can interact with the model if its not returning anything from the database. (and again all the models work great on my local machine).
my models looks like that:
class Default_Model_picture extends Zend_Db_Table_Abstract
{
protected $_name = 'pictures';
protected $_primary = 'id';
public function getPicturesByCategory($category)
{
$query = $this->select()->from(array('pictures'), array(
'pictures.id', 'pictures.pic_name', 'pictures.pic_desc',
'pictures.pic_category', 'pictures.pic_date_added',
'pictures.pic_larger', 'pictures.pic_url'));
$query->where('pic_category = ?', $category);
$query->order('pic_date_added ASC');
$result = $this->fetchAll($query);
return $result;
}
}
this is an example for a model, obviously i did not added lots of methods.
i have no idea what to do next.