Advertisement
Advertisement
| 06.19.2008 at 11:12AM PDT, ID: 23499962 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: |
// OLD CODE *************************************************************************************
require_once 'Zend/Db/Table/Abstract.php';
class Items extends Zend_Db_Table_Abstract {
/**
* The default table name
*/
protected $_name = 't_items';
}
public function showallAction()
{
$this->view->title = "Showing All Inventory";
$items = new Items();
$this->view->items = $items->fetchAll();
}
// NEW CODE ***********************************************************************
class Fetchshortview {
$query = $db->select();
$query ->from('v_itemshort', array('id','nickname','serial'));
}
public function showallAction()
{
$this->view->title = "Showing All Inventory";
$items = new Fetchshortview();
$this->view->items = $items->fetchAll($query);
}
|