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

getting rows from table with zend db

I have basically the following table, Categories id name categories_id_categories 1 Clothes null 2 Shirts 1 3 Pants 1 4 Electronics null 5 Tv 4 The table stores categories and sub-categories, if the…
Javier Villanueva
  • 3,886
  • 13
  • 48
  • 80
0
votes
1 answer

Problems loading Zends Session in bootstrap

I am having trouble getting Zend to store my session in MySQL table. I have followed the Zend Framework guide step by step, and am not sure if is where am putting the code in my bootstrap file, but once the code snippet is in place and I load my…
mmenafra
  • 110
  • 5
0
votes
1 answer

Zend Table Relationship with Primary Composite Key - delete record from table

I have three tables //1 CREATE TABLE `client_domain` ( `client_id` int(10) unsigned NOT NULL, `domain_id` int(10) unsigned NOT NULL, PRIMARY KEY (`client_id`,`domain_id`), KEY `FK_client_domains_domain` (`domain_id`), CONSTRAINT…
0
votes
1 answer

Zend Framework how do i access different table classes from my Application_Model_Report?

I have a report model which I am using as the main container for all the functions that fetch various report data. This report model has the following functions protected $_dbTable; public function setDbTable($dbTable) { if…
Napoleon
  • 879
  • 2
  • 14
  • 36
0
votes
1 answer

Zend Framework Query with Joins

I am trying to replicate this query using zend framework: SELECT activitytype.description, activity.datecompleted FROM clientactivity INNER JOIN activity ON activity.activityID = clientactivity.activityid INNER JOIN activitytype …
Martin
  • 235
  • 5
  • 16
0
votes
1 answer

New non-table field in Zend_Db_Table_Row

Say i am fetching a single row by using $row=$model_produc->fetchRow(); it contains category_id but not category_name, i will fetch category name from the category table. My Question is that how can i add new attribute in $row say…
Imran Naqvi
  • 2,202
  • 5
  • 26
  • 53
0
votes
1 answer

How to do this select join in Zend_Db_Select?

How do I make this in Zend_Db_Select? I have this query and I need make in Zend: SELECT `cursos_categorias`.`rotulo` AS `categoria`, `cursos`.`titulo`, `cursos`.`subTitulo`, `imagens`.`src` AS `imagem`, `cursos`.`url`, …
0
votes
1 answer

Updating specific columns not all model entities

Zend 1.8 Geeks! I always use model_mapper to update insert and fetch data from the db by this example : $a=somthin; $y=qwe; $dataMapper = new model_mapper_data(); $dataModel = new model_data(); $dataEntity=$dataModel->AA=$a ; …
Suhayb
  • 3,163
  • 3
  • 23
  • 30
0
votes
1 answer

UNION and NOT IN Mysql Operation with Zend framework

I need to execute the following mysql query in Zend;I am not an excpert with Zend framework SELECT `optionride`.`featureoption_id`, `optionride`.`featureoptionride_id`,`foption`.`featureoptionblock_id`, `foption`.`labelname`,`optionride`.`value`…
Aadi
  • 6,959
  • 28
  • 100
  • 145
0
votes
1 answer

Zend_Db, how to work with related tables?

I want to learn to work with related tables in the ZF to the end. (1) Can anyone help with this? there are 2 users table and *users_openid* with a link to many. I would like to implement a relationship between the tables at Zend_Db so that such…
ErgallM
  • 237
  • 3
  • 9
0
votes
1 answer

Zend insert user and set value to max()+1

My code: public function insertMember($member) { $maxOrderNumber = $this->select() ->from($this, array(new Zend_Db_Expr('max(order_number)'))); $id = $this->insert($member, $maxOrderNumber); return $id; } I want to insert…
uncklegwebdev
  • 62
  • 2
  • 9
0
votes
1 answer

Load models in Zend Framework

I tried to search here before creating this, but I couldn't find anything. I have a simple project without modules and I'd like to load my models (which are inside application/models) without using any namespace and without usign any extra loading…
Rodrigo Souza
  • 7,162
  • 12
  • 41
  • 72
0
votes
1 answer

Convert raw sql to ZF2 statement

In zf2, how can i write following mysql query and execute it. ?? SELECT * FROM `user_modules` um JOIN ((SELECT vm.id, vm.module_code, vm.module_title,'video' AS type FROM video_master vm WHERE vm.is_deleted = 0) UNION (SELECT sm.id, sm.module_code,…
0
votes
1 answer

How to fetch many rows order by a specific value

by using zend 1.12 how to order the data fetched by, a specific entry first. (order by) how to make the last option for ex 'Bioversity International' be the first one beside the where clause a written below . $_partnerMapper = new…
Suhayb
  • 3,163
  • 3
  • 23
  • 30
0
votes
1 answer

Smarty or PHTML In Zend Framework

WHich is faster? Using smarty or the regular .phtml view files in the zend framework? Which do you recommend? I don't really like using libraries that don't follow zend coding standards.
BRampersad
  • 862
  • 1
  • 12
  • 25