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

What is the most suitable way to work with databases in Zend Framework?

I'm developing web application with Zend Framework. In the documentation it says ... "Be aware though that the Table Data Gateway pattern can become limiting in larger systems." What are the drawbacks of using Table Data Gateway ? What is the…
ChamingaD
  • 2,908
  • 8
  • 35
  • 58
0
votes
1 answer

Zend DB Update not updating

I dont know why this particular bit of code is simply not updating despite using this style of coding elsewhere succesfully.No exception is being thrown. CREATE TABLE `accounts` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `accounts_username`…
davykiash
  • 1,796
  • 5
  • 27
  • 60
0
votes
1 answer

How do I go around this Zend_Form_Element_Select db error?

When i use the Zend_Form_Element_Select elements with multioptions i get this error when i pass the selected value to Zend_DB_Table to insert into the db Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'accounts_status ' in 'field…
davykiash
  • 1,796
  • 5
  • 27
  • 60
0
votes
0 answers

Zend 2.2, building first app, AJAX call and custom query

im building my first zend application and i want to use Ajax call also make custom Query to DB my code is : BookingTable class public function getAjaxBooking() { $rowset = $this->tableGateway->select(array('id' => 2)); return…
Viszman
  • 1,378
  • 1
  • 17
  • 47
0
votes
1 answer

Zend Framework 2 inserting into database works fine but still iam getting an error

Here is my model code below, public function insertme() { $sel = new Sql($this->adapter); $s = $sel->insert('users'); $data = array( 'fname'=>'fisdsds', 'lname'=>'sdsdsdme', 'email'=>'sdsdsds', …
Friend
  • 1,326
  • 11
  • 38
  • 62
0
votes
1 answer

Why Zend framework Db Table put an asterisk before the table name on my query?

I have a problem with a query like this: $sSqlAux = $this->select()->setIntegrityCheck(false) ->from(array("a_aux" => $this->_name), "id_a", $this->_schema) ->join(array("b_aux"=> "b"), "a_aux.id_a = b_aux.id_b", array(), $this->_schema) …
0
votes
1 answer

zf many to many relationship, how to find values stored in intermediary table without a second lookup

I have a many to many relationship between two tables which is represented with an intermediary table. I am using the ZF1 table relationships methodology to model the database in my application and this works fine. One thing I am struggling with is…
Antony Castle
  • 193
  • 1
  • 11
0
votes
1 answer

Zend_Framework 1.12 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax

Before anything I am aware of the multiple questions asked concerning this exception. I have looked through them but have not found an answer for my particular problem. Most of the questions use the Zend_Db_Table::getDefaultAdapter(); , and I am not…
Chayemor
  • 3,577
  • 4
  • 31
  • 54
0
votes
2 answers

Zend Db Sql Where

Hi how can I do a query like this in zf2 with zend\db\sql? Query: SELECT * FROM table WHERE field = $field AND data > SUBDATE(NOW(), INTERVAL 1 DAY) In ZF2 $select = $this->sql->select(); $select->from(self::MYTABLE) …
0
votes
2 answers

Zend_Db_Table_Row_Exception

I have this query below which I am trying to port to Zend (even further below lol). I am getting this error: Uncaught exception 'Zend_Db_Table_Row_Exception' with message 'Specified column "admin_vfname" is not in the row' But when I echo the…
Kal
  • 2,239
  • 6
  • 36
  • 74
0
votes
3 answers

Zend framework Class 'Model_DbTable_indexview' not found in

I just installed a script i purchased and i'm facing issues with the file not found. I checked the function and Model_DbTable_indexview do exist in the model folder. Is there anywhere that i should be looking at ? Any hints would be greatly…
CodeGuru
  • 3,645
  • 14
  • 55
  • 99
0
votes
2 answers

How to get table foreign keys in Zend Framework?

I can get table columns with information about columns types by writting: $table = new Zend_Db_Table('schema.table_name'); $info = $table->info(); There is information about Primary key, but nothing about Foreign keys. Please help!
19th
  • 11
  • 2
0
votes
1 answer

Zend DbTable get rows from referenced table from other module

I am currently working an a Zend framework 1.12 based project. I use different modules to keep things separated as good as possible. My data is stored in a mysql database so I set up some db table models inside my project. The relation between the…
DanK
  • 3
  • 4
0
votes
2 answers

How can disable quote join Zend db

I've sql query select * from table1 left join (values (4),(1800),(103500)) AS "filter (id) on table1.id=filter.id By default Zend_Db_Select table quoted. For example: $result = '(values (4),(1800),(103500)) AS filter…
gregman
  • 332
  • 1
  • 11
0
votes
1 answer

What happens if you call refresh() on Zend_Db_Table_Row_Abstract after the row has been deleted from the db?

I'm using Zend Framework version 1.x The documentation for the refresh method of Zend_Db_Table_Row_Abstract says only: Refreshes properties from the database. My question is what this method will return if the row has been deleted from the database…
jgivoni
  • 1,605
  • 1
  • 15
  • 24