Questions tagged [zend-db]

Database access component for the Zend Framework.

for PHP 5 includes a database access component, referred to as Zend\Db.

The Zend\Db component includes features such as:

  • Database connection factory class.
  • Adapter for multiple brands of database, closely matching the interface, and also supporting other non-PDO database interfaces such as mysqli and oci.
  • Simple query builder for generic SELECT syntax.
  • statement profiler and logger.
  • Table Data Gateway and Row Data Gateway classes. Together these are similar to the popular Active Record pattern.

Resources:

  1. Github repository
1092 questions
0
votes
1 answer

Zend Model Class - Select queries being declared as static methods

I'm looking at some code I have inherited. In all the Model classes - any method that does a "Select" query has been declared as static where as the "insert", "update", "delete" are not declared as static in the same Model class. For…
Gublooo
  • 2,550
  • 8
  • 54
  • 91
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_Db with Type Decimal

I have MySQL database for store data. Some field is type decimal. I don't know why zend_db always fill zero pad for decimal type field. public function getListings() { $select = $this->getDb()->select() …
Hensembryan
  • 1,067
  • 3
  • 14
  • 31
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
1 answer

INSERT DELAYED with Zend_Db_Table_Abstract::insert()

I have a few cases in my application that I would like to execute INSERT DELAYED rather than the standard INSERT to speed up the script performance. I have a script that inserts hundreds of rows and might benefit from that feature. I've read that…
aporat
  • 5,922
  • 5
  • 32
  • 54
0
votes
1 answer

Registration form with salt and SHA1 encryption

I have a registration form and I am using zend_auth for my login, below is how the information is encrypted for secure login: ->setCredentialTreatment('SHA1(CONCAT(?,salt))'); I have the following register method so far: public function…
Rex89
  • 153
  • 1
  • 3
  • 12
0
votes
0 answers

Terrible performance in Zend Db PDO_sqlite insert and update queries

I'm having some major issues with my sqlite database performance. I'm using it for storing small amount of data, which should be really fast, but somehow takes way too long. First of all, I create Zend_Db object with factory static method: $this->db…
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

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
1 answer

Is zend allows to pass control to a file program which is located outside the zend folder?

Is zend allows to pass control to a file program which lies outside the zend folder and get the control back after finishing the exicution of the program??? I want to access a file program which is located in another sdk(aws sdk: amazone dynamo Db)…
Jithu.S
  • 88
  • 1
  • 7
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
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
2 answers

store current date and time in the datetime format zend

I have a field called date_time in the database which is of type datetime. I have a form which on submit needs to enter the current date and time in the date_time field. How do I write my code so that the date_time field gets inserted with the…
Micheal
  • 2,272
  • 10
  • 49
  • 93
-1
votes
1 answer

How can I make my code more MVC like in Zend Framework

I am new to ZF. I have no idea about the flow of ZF MUCH. What I do is that I am coding my models class work too in my controllers action. That works pretty well, but I don't like this. I want ZF style. Below is my code I mean my one action on my…
Fawad Ghafoor
  • 6,039
  • 7
  • 41
  • 53