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
4 answers

Access denied error on select into outfile using Zend

I'm trying to make a dump of a MySQL table on the server and I'm trying to do this in Zend. I have a model/mapper/dbtable structure for all my connections to my tables and I'm adding the following code to the mappers: public function dumpTable() { …
Peter
  • 1,211
  • 4
  • 17
  • 32
0
votes
1 answer

Zend_DB_Table Update problem

Am trying to construct a simple update query in my model class Model_DbTable_Account extends Zend_Db_Table_Abstract { protected $_name = 'accounts'; public function activateaccount($activationcode) { $data = array( …
davykiash
  • 1,796
  • 5
  • 27
  • 60
0
votes
2 answers

zf2 db sql where datetime before two ours ago

I'm looking for the right zf2 syntax to select timestamps / timeranges from the database. I know how to make where statements. However it seems that greaterThan() and lessThan() are not working with timestamps/datetime: where = new…
Manuel
  • 9,112
  • 13
  • 70
  • 110
0
votes
0 answers

Zend Framework - Login error - Zend_Auth_Adapter_DbTable

I have an error with the user login Error: The supplied parameters to Zend_Auth_Adapter_DbTable failed to produce a valid sql statement, please check table and column names for validity. #0 /home/cari/library/Zend/Auth/Adapter/DbTable.php(369):…
Luke
  • 1,794
  • 10
  • 43
  • 70
0
votes
1 answer

Zend Table Relationship not working correctly

I have two tables: // User.php class Model_Table_Users extends Zend_Db_Table_Abstract { protected $_name = 'users'; protected $_primary = 'id'; protected $_dependentTables = array('UserGroups'); } // UserGroups.php class…
Alexander Schranz
  • 2,154
  • 2
  • 25
  • 42
0
votes
1 answer

Zend_Db - union

I have code: $balanceModelCredit = new Model_BalanceCredit(); $balanceModelDebt = new Model_BalanceDebt(); $selectQueryDebt = $balanceModelDebt->select() ->from('balance_debt', array('date', 'amount', 'description', new…
faszynski
  • 419
  • 3
  • 11
  • 26
0
votes
1 answer

Zend Framework select in select Zend_Db_Table

does anyone know how to do a nested query such as "SELECT * FROM (SELECT * FROM table LIMIT 0,12) table ORDER BY rand ()", using Zend_Db_Table?
0
votes
1 answer

Zend Models Model_DbTable_Articles working, Articles not

I got problems with my ZF Models. Where I create new model, put it in Dbtable/Articles.php and name class as Model_DbTable_Articles it is working. But when I name class Articles I got error: Fatal error: Class 'Articles' not found Why? :)
Sergio E.
  • 39
  • 1
  • 6
0
votes
2 answers

Print array into another array [Zend]

I use Zend 1 CONTROLLER: public function insertarAction() { $entidades_salud = new Application_Model_DbTable_EntidadesSalud(); $datos_entidades = $entidades_salud->buscarEntidades(); } MODEL:
Jhosman
  • 555
  • 2
  • 8
  • 20
0
votes
1 answer

How to call stored procedure in zend1 with doctrine1

Please help me : I want to call mysql stored procedure in zend1 by doctrine1 My stored procedure is : CREATE PROCEDURE sp_test() BEGIN SELECT 'Number of records: ', count(*) from user; END// stored procedure working fine in phpMyAdmin. But…
0
votes
1 answer

Zend Framework 1 - Message: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound

An error occurred Application error Exception information: Message: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound My Controller: public function insertarAction() { $data = $this->getRequest()->getParams(); //…
Jhosman
  • 555
  • 2
  • 8
  • 20
0
votes
2 answers

Strange error with zend frame work

Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[28000] [1045] Access denied for user 'liveaide_dbuser1'@'lynx-u.znetindia.net' (using password: YES)' in…
Nisanth Kumar
  • 5,667
  • 8
  • 33
  • 43
0
votes
2 answers

Unable to delete a record through Zend_Db_Table_Abstract->delete()

I am trying to delete a record through a delete action using zend framework Model. i am still unable to figure out why its not deleting and the $model->delete() always returns zero. (0) this is my delete action code. public function…
dev1234
  • 5,376
  • 15
  • 56
  • 115
0
votes
1 answer

Execute Query with Where Condition For ResultSet Zend Framework 2?

I have one tabel 'cms' which include cms page with 3 separate parent category(type) . when i call fetchAll() function which fetch all data but i want to only fetch data which parent category(type)='1' means i want to pass where condition and orderby…
Chirag Shah
  • 1,463
  • 2
  • 18
  • 40
0
votes
1 answer

Help With Select Query In ZF

Ok. This version of select works: $select = $this->select(); $select->setIntegrityCheck(false); $select->from(array('u' => $this->_name), array('u.id', 'u.username', 'u.avatar_path', '(SELECT…
Richard Knop
  • 81,041
  • 149
  • 392
  • 552