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

Avoid connecting to the database in a view

In IndexController I retrieves data from the table and sends them to the view. In view I do foreach loops and displays it. One type of data needs to be taken from the database, so the link to the database in a view to get it.
Marcin
  • 1
0
votes
1 answer

zend dynamically create classes or access many different tables using a single controller and model

I have over 100 tables. I need to access each of these tables depending on a username that is provide on a form. The username is the table name. I do not not want to create 100 of classes for each one representing a table. Is there a way i can do…
shorif2000
  • 2,582
  • 12
  • 65
  • 137
0
votes
2 answers

How to Convert Zend_Db_Rable_Row to object

How to Convert Zend_Db_Rable_Row to object. Assume the database table has same column names as the variables in the object except the '' (private variables in the object are starting with '' (underscore)) for example database table column is…
Sachindra
  • 2,052
  • 4
  • 23
  • 29
0
votes
2 answers

Setting-up Application.ini in Zend Framework for Model

I'm new to Zend Framework. I've been following book "ZendFramework - A Beginners Guide". in the 4th chapter, they start using Doctrine. The thing is that I'd like to use Zend's built-in functionality with database interactions. I've searched the web…
mrGott
  • 1,066
  • 3
  • 18
  • 53
0
votes
1 answer

Zend_Db_Expr('NOW()') and datetime in Mysql

So I am having a strange problem on live website, and I am not sure what is causing the problem since in datetime field in mysql table sometimes time is mapped and more often it isn't. However date is always mapped. Code goes like this: …
Splendid
  • 1,317
  • 4
  • 20
  • 41
0
votes
1 answer

Zend fetchall cannot return primary ID

I cannot get primary id array, I try to debug it happens when use joinLeft function Here my script //setIntegrityCheck to false to allow joins $roomModel = new self(); $select =…
Akram
  • 423
  • 2
  • 5
  • 13
0
votes
1 answer

Zend select issue

I am having an issue with zend database table library; Sorry, I got fixed the previous issue, but got another one at the function Message: Method "fetchAll" does not exist and was not trapped in __call() Here is the script I am using …
Akram
  • 423
  • 2
  • 5
  • 13
0
votes
2 answers

Zend Db Table and setting fetch mode

I would like to change the fetch mode within an extended class of Zend_Db_Table_Abstract. The following does not work: fetchAll(Zend_Db::FETCH_NUM); …
mdthh
  • 1,248
  • 1
  • 13
  • 22
0
votes
1 answer

Zend Framework Delete Cascade

Hi i'm using zend framework and I have a problem on delete cascade. I have two entity in Zend db table called User and other two (because i have 2 tipe of users) connected to User User is class Application_Model_DbTable_User extends…
Simone
  • 85
  • 1
  • 9
0
votes
1 answer

execute query in zend framework

I want to execute below query in zend framework. can anyone tell me how can I do that? (SELECT `msg`.`message_sender_id`, `msg`.`message_receiver_id`, `msg`.`message_content`, `msg`.`message_sent_on`, `usr`.`user_name` AS `sender_name` FROM…
Rukmi Patel
  • 2,619
  • 9
  • 29
  • 41
0
votes
1 answer

sql query is not executing properly in zend framework

Table : sc_message ______________________________________________________________________ |message_id | message_sender_id | message_receiver_id | message_content| ------------------------------------------------------------------------ Table…
Rukmi Patel
  • 2,619
  • 9
  • 29
  • 41
0
votes
2 answers

Zend Framework Table Relationships - select from multiple tables within app

I hope I'm asking this question in an understandable way. I've been working on an app that has been dealing with 1 table ( jobschedule ). So, I have models/Jobschedule.php, models/JobscheduleMapper.php, controllers/JobscheduleController.php,…
Tommy Ash
  • 1
  • 1
0
votes
2 answers

Zend - db table not found in another module

I have an application with three modules:default, disciplines and plans. In disciplines I have a dbtable which works fine in this module, but if I want to use the dbtable in module plans inside plans_dbtable I get Class…
0
votes
1 answer

Zend Paginator Limit Rows(Optimization)

This is my query: class services extends Zend_Db_Table{ function Get_Services($user_id){ $DB = Zend_Db_Table_Abstract::getDefaultAdapter(); $select = $DB->select() ->from(array('p' => 'phone_service')) …
Edward Maya
  • 429
  • 2
  • 10
  • 25
-1
votes
1 answer

Why is $db->info('primary') returning an array instead of a string?

I've been looking for the answer for an hour or two and can't find it. I have this class that extends Zend_Db_Table_Abstract where I fill the table name and its primary key. Here it is:
D4V1D
  • 5,805
  • 3
  • 30
  • 65
1 2 3
29
30