Questions tagged [zend-db-table]

Object-oriented interface to database tables

The Zend_Db_Table class is an object-oriented interface to database tables. It provides methods for many common operations on tables. The base class is extensible, so you can add custom logic.

The Zend_Db_Table solution is an implementation of the Table Data Gateway pattern. The solution also includes a class that implements the Row Data Gateway pattern.

Official documentation

437 questions
0
votes
1 answer

Changing Zend_Db_Select's output to Zend_Db_Table_Rowset

I have the following code inside a class that extends Zend_Db_Table_Abstract: public function fetchByFriends($id) { /* * SELECT * FROM list * INNER JOIN friendship ON * list.user_id = friendship.friend_id * WHERE…
Ross
  • 46,186
  • 39
  • 120
  • 173
0
votes
1 answer

Fetch the maximum value of a field having same id in php

I need to return all the InstallmentDates along with the return data, the issue here is I have same OrderInstallmentDetailsId for multiple InstallmentDates. $select = $this->select() ->setIntegrityCheck(false) …
0
votes
1 answer

Zend Framework: SetIntegrityCheck(false) and then update the object

I am getting data from two tables using join and putting setIntegrityCheck(false) in my model. Now I need to call save() on that object. I know when you put setIntegrityCheck(false), you cannot call save(), delete() or update() to this object. I…
Awais Qarni
  • 17,492
  • 24
  • 75
  • 137
0
votes
1 answer

Zend_Paginator + Query Paramenter (ZF1)

I am using the ZF1 with Zend_Paginator but if I have a search that brings all data without filter, works perfectly, but if I have a query filter paging works only on the first page. public function getConsultaTelefones($setor) { …
phpricardo
  • 131
  • 4
0
votes
1 answer

Zend Framework 1.12 cant connect to database with Db_Table

I am creating my second Zend Framework project (using 1.12) and have set it up just like the first (uses 1.11), but for some reason I am having problems connecting to my database using my class extending Zend_Db_Table. I have my database…
xena
  • 163
  • 1
  • 13
0
votes
1 answer

"An error occurred Application error" Zend Authentication

I am following tutorial from here . And finally when I couldn't do it properly, I just downloaded the code given there. My application.ini file is [production] phpSettings.display_startup_errors = 0 phpSettings.display_errors =…
Nabin
  • 11,216
  • 8
  • 63
  • 98
0
votes
1 answer

Complex result sets based on a pattern in Mysql

I have a table that has records attached to owners ids. when I retrieve a result-set it is likely to have multiple rows belonging to the same owner. I would like to order my results in a fair fashion to the owners showing 1 record for each owner…
0
votes
1 answer

\Zend\Db\Sql\Sql where how to add expression?

I have some query when I need to add expresion to WHERE closure. I need this: (column / ?) % 100 = 0 So I try this: $where->and->equalTo(new Expression('(column / ?) % 100', $value), 0); but this return error.
0
votes
0 answers

Using Zend_Db_Table_Abstract with Google App Engine Cloud SQL

I'm using Zend_Db_Table_Abstract to connect to my db with the following init code in the constructor of my class (that extends Zend_Db_Table_Abstract): $db = new Zend_Db_Adapter_Pdo_Mysql(array( 'host' => 'CLOUD.SQL.IP.ADRESS', …
0
votes
0 answers

Zend_Db_Select - Get all selected tables and columns

We are using the Zend Framework in our company and thus we're using Zend_Db_Select. Now we are building a query with it which is then (pre fetch) passed to a function. The query is built as follows: $select = $this->_selectAll() …
sleepless
  • 1,769
  • 1
  • 22
  • 33
0
votes
1 answer

Specific categories in ZF1

I have this model: class Application_Model_Categories extends Zend_Db_Table_Abstract { protected $_name = 'categories'; protected $_referenceMap = array( 'Stores' => array ( 'columns' => 'store_id', …
handsome
  • 2,335
  • 7
  • 45
  • 73
0
votes
1 answer

rename fields in Zend select/join query

I have 2 Tables: region: region_id,name,state_id state: state_id,name I want both names in my result, state.name renamed to statename. So far I got this: $select = $select->from(array('r' => 'region'))->join(array('s' => 'state'), 'r.state_id =…
cari
  • 2,251
  • 2
  • 18
  • 27
0
votes
2 answers

how to use multiple $_name using extends Zend_Db_Table_Abstract in zend frame work

we tried to do like this,but it is showing some errors.Our table names are users and messages.
karthik
  • 1
  • 2
0
votes
2 answers

Zend DB returning NULL value

I have the following query that extends from Zend_DB_Table_Abstract $select = $this->select() ->from('expense_details', array('SUM(expense_details_amount) AS total')) ->where('YEAR(expense_details_date) = ?',…
davykiash
  • 1,796
  • 5
  • 27
  • 60
0
votes
1 answer

Zend DB Table update affected rows are zero

I am updating the db table using below code but it does not seem to working fine. $model = new Admin_Model_DbTable_SmsTemplate(); $where = $model->getDbTable()->getAdapter()->quoteInto('id = ?',…
Manish Jangir
  • 5,329
  • 4
  • 42
  • 75