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

How to use Join in Zend Framework?

i have these two tables , s(id,firstname,lastname,mydate,mount,sh) users(uid,email,password,nameoffice) and this query $sql="SELECT s.id,s.firstname,s.lastname,s.mydate,s.mount,users.nameOffice FROM sayer LEFT JOIN users ON…
ulduz114
  • 1,150
  • 6
  • 21
  • 37
0
votes
1 answer

Results Database of Zend Framework

I am doing a database query in this way: foreach ( $_SESSION['cart'] as $product ) { $id = (int)$product['id']; $select = $this->table->select(); $select->where("id=$id"); …
0
votes
2 answers

SQL to Zend_Db_Table

I'm trying to convert a SQL to Zend_Db_Table SELECT c1.* FROM beneficios c1 left join beneficios c2 on c1.document_id = c2.document_id and c1.versao < c2.versao where c1.id_projeto = 8 and c2.document_id is null order by ordem ASC; I have a…
dextervip
  • 4,999
  • 16
  • 65
  • 93
0
votes
1 answer

Zend Framework : Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;

I am getting this error Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Stack…
Future King
  • 3,819
  • 6
  • 28
  • 37
0
votes
1 answer

Function to convert data retrieved from Zend_table to html entities

i'm using zend_tables for my model and i'd like to create a function to convert all data from a single row (retireved like this: $row = $model->find($id)) to htmlentities before outputting it with the usual code: echo…
Nicola Peluchetti
  • 76,206
  • 31
  • 145
  • 192
0
votes
3 answers

Select ignores where clause using Zend_Db_Select

$table = new Zend_Db_Table(array('name'=>'rules')); $select = $table->select(); $select->setTable($table); $select->setIntegrityCheck(false); $select = $select ->from(array('ru'=>'rules'),array('ru.*')) …
Omar
  • 8,374
  • 8
  • 39
  • 50
0
votes
1 answer

Zend table row abstract model method thows Unrecognized method 'updateFromArray()'

I have very specific problem with my Zend Framework application. I use my own Model class called My_Model which is singleton and I use it for calling DB models. Every model extends My_Db_Table class and has a row class that extends My_Db_Table_Row.…
Bery
  • 1,094
  • 1
  • 10
  • 23
0
votes
1 answer

Need help with zend_select() Join

I'm currently working with Zend framework and I need help to convert this query to zend_select() format. Can someone kindly help me out please Thanks so much in advance! SELECT p .* FROM provider p INNER JOIN providerReligionPreference prp ON…
user648198
  • 2,004
  • 4
  • 19
  • 26
0
votes
2 answers

Problem with Zend SQL Union Query

I'm having trouble making a Union query using the Zend Framework. The queries are these: $localizedEvents = $db->select() ->from(array("cont" => "content")) …
nunohora
  • 5
  • 3
0
votes
1 answer

Zend_Db_Table, JOIN and mysql expressions in one query?

Im trying to build a complex (well...) query with Zend_Db_Table where I will both need to join the original table with an extra table and get some extra info from the original table with zend_db_expr. However, things go wrong from the start. What I…
Peter
  • 1,211
  • 4
  • 17
  • 32
0
votes
1 answer

Zend Framework model relationships and accessing related records

I've got a zend framework model: class User extends Zend_Db_Table_Abstract { protected $_name = 'users'; protected $_primary = 'id'; protected $_dependentTables = array('UserItem'); public function refresh($) { $items =…
Alex C
  • 16,624
  • 18
  • 66
  • 98
0
votes
1 answer

Zend_Db_Table Cascade DELETE doesn't work

I am developing an application to manage a law office using zend framework 1.10,PHP 5.3 and MySQL, I have made a relationship between two tables and I wanted to do cascade deletion however It doesn't work, I tried all possibilities but…
dextervip
  • 4,999
  • 16
  • 65
  • 93
0
votes
1 answer

Zend_Db_Table "where" for relations?

Hello all Is Zend_Db_Table (Zend_Db_Table_*) supports where for related data that defined through $_referenceMap / $_dependentTable As example, i have Blogs (table: blogs) and Regions (table: regions) classes, each Blog have…
0
votes
1 answer

Zend DB relationships

I am creating an application in zend framework. Now i am stuck in the Zend table relationships. I have 2 tables. I have set the primary key and the corresponding references in other tables. Now i want to join the two tables using the relationships…
Nandakumar V
  • 4,317
  • 4
  • 27
  • 47
0
votes
1 answer

How to insert multiple data with single query using zend 2

I am trying to insert multiple data with single query using zend 2. For reference below is the code . It is not throwing any error but data is not getting inserted. I am calling "mapOffers" from controller where I am passing the indexed array…
ssnegi
  • 183
  • 1
  • 1
  • 15