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

Problem with Zend_Db_Abstract in Model

I've found out that when I extends Zend_Db_Table_Abstract in my model I get An Error Ocurred Aplication error When I run this code
Rodrigo Souza
  • 7,162
  • 12
  • 41
  • 72
0
votes
1 answer

Why am I getting Application error while trying to load a model?

I've run this code Zend_Loader::loadClass("Admin_Models_DbTable_News"); and my application has this folder structure Why do I get this: An error occurred Application error
Rodrigo Souza
  • 7,162
  • 12
  • 41
  • 72
0
votes
1 answer

Problem loading models with modules in Zend Framework

I have a folder structure like this and I'm trying to load the News model inside my controller:
Rodrigo Souza
  • 7,162
  • 12
  • 41
  • 72
0
votes
2 answers

How does one query a Zend_Db_Table_Row

Is it possible to run an SQL (Zend_Db_Select) query against a Zend_Db_Table_Row object? What about joining two Zend_Db_Table_Row objects? I know it sounds a bit retarded, but I'm processing hundreds and thousands of rows. I already have the row…
d-_-b
  • 6,555
  • 5
  • 40
  • 58
0
votes
1 answer

findDependentRowset returning all rows

I have these two models: class Application_Model_List extends Zend_Db_Table_Abstract { protected $_name = 'list'; protected $_primary = 'list_id'; protected $_dependentTables = array('Application_Model_Task'); public function…
robjmills
  • 18,438
  • 15
  • 77
  • 121
0
votes
2 answers

Modify all queries in Zend\Db (add where)

I need to modify all queries that are executed through Zend\Db before sending them to DB. Basically it needs to add additional WHERE statement to all selects, updates and deletes and additional column and value in inserts. I was thinking about…
Adam
  • 873
  • 7
  • 33
0
votes
2 answers

zend framework components DB can't find class Zend_Paginator_Adapter_DbTableSelect

I'm using some Zend libraries outside of the Zend Framework in a small project. I'm using Zend_Db and Zend_Paginator but when I'm trying to set up the pagination using Zend_Paginator_Adapter_DbTableSelect I get an error that it can't find the class.…
EricP
  • 1,459
  • 6
  • 33
  • 55
0
votes
2 answers

Zend Framework 2 Access DB from Custom Library

I am migrating a project from Zend framework 1.4 to 2.4, I have a class in "vendor/custom/classes/User.php"
Prasad Rajapaksha
  • 6,118
  • 10
  • 36
  • 52
0
votes
2 answers

Zend_db_table: How to Select with a Mysql Keyword

Any Ideas how I can build the following query with the zend_db_table class? SELECT SUM(x) FROM traffic thanks
user409460
0
votes
1 answer

Zend Framework: How Do I 'auto' generate a SQL query correctly

I want to generate the following SQL: SELECT `rc`.*, `c`.`name` FROM `RunConfigurations` AS `rc` INNER JOIN `Clients` AS `c` ON rc.client_id = c.id WHERE (rc.client_id = ?) ORDER BY `rc`.`config_name` ASC However I am getting: SELECT `rc`.*, `c`.*…
ashurexm
  • 6,209
  • 3
  • 45
  • 69
0
votes
1 answer

Zend\Db\Sql\Select multiple where (combination between AND and OR)

I'm a little stuck at a query with multiple where. I want to 'translate' the query bellow in my Zend\Db\Sql\Select query: SELECT `users`.*, `users_metas`.* FROM `users` INNER JOIN `users_metas` ON `users`.`ID` = `users_metas`.`parent_id` WHERE…
Andreea
  • 139
  • 12
0
votes
1 answer

how can define table record is exiest or not in table in database using db-table in zend

i am using zend framework. i want to define product name is exist or not if not then insert the product name. i am using this code in controller $this->product_tbl = new Application_Model_DbTable_Producttbl(); $product_name =…
0
votes
1 answer

update query doesn't work in ZF 1

my sql-query doesn't work. here is my query. public function deletes($poss) { $where = array('pos > ?' => $poss); $this->update(['pos' => 'pos - 1'], $where); } it's seems he does every pos -1 instead of the ones greater than…
0
votes
2 answers

How to convert nested sql query to zend 1.12 format

My Query: select distinct ml.send_to from message_log as ml where NOT exists (select mobile_no from user_details WHERE user_details.mobile_no = ml.send_to);
0
votes
0 answers

Zend 1.12 trims accents and special characters off

I have a problem with my Zend installation. It trims special characters (with accents) and simple quotes off before sending my to the my Database (MySQL) In my bootstrap.ini, it's set to use UTF-8 `$dbAdapter->query("SET NAMES 'utf8'");` Is…
Stéphane Joos
  • 743
  • 1
  • 6
  • 13