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
2 answers

Print array into another array [Zend]

I use Zend 1 CONTROLLER: public function insertarAction() { $entidades_salud = new Application_Model_DbTable_EntidadesSalud(); $datos_entidades = $entidades_salud->buscarEntidades(); } MODEL:
Jhosman
  • 555
  • 2
  • 8
  • 20
0
votes
2 answers

How to include Zend_DB class?

I want to use the class Zend_Db (and other Zend classes later). However, after 5 hours I am still not able to access this class. Could someone please point me towards a solution? It would already be helpful to know which of the hundreds files in the…
tyrex
  • 8,208
  • 12
  • 43
  • 50
0
votes
2 answers

Zend Db Table delete not working

I am new to zend framework and want to delete data from database, but delete function is not working. Please help me out. Here bis my controller code. public function deleteAction() { if($this->getRequest()->isPost()) { $del=…
Tuhin
  • 103
  • 1
  • 2
  • 12
0
votes
2 answers

Update query updates all rows in database instead of particular row

I am new to Zend framework and I am trying to update data in database and grid, but instead of updating particular row all rows are getting updated. please help me with this. Here is my controller code. public function editAction() { $form = new…
Tuhin
  • 103
  • 1
  • 2
  • 12
0
votes
2 answers

Call to a member function getValue() on a non-object in /var/www/docs/Project.com/public/application/controllers/ClientController.php on line 31

I am trying to insert a data into database and display it in grid but getting an error Call to a member function get Value() on a non-object. Here is my controller code. public function addAction() { $form = new…
Tuhin
  • 103
  • 1
  • 2
  • 12
0
votes
1 answer

Zend Framework 1 - Message: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound

An error occurred Application error Exception information: Message: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound My Controller: public function insertarAction() { $data = $this->getRequest()->getParams(); //…
Jhosman
  • 555
  • 2
  • 8
  • 20
0
votes
1 answer

Zend Framework 2 mysql view

I've scoured the site and other places and haven't found a complete solution. I'm a newbie to ZF2 and have worked through the album example and set-up Table Gateways etc, but now I need to be able to query a mysql view and return those results to my…
webdev27
  • 43
  • 1
  • 7
0
votes
0 answers

Link Zend Framework 1.12 on Azure with a database on Azure

I have a website, which i've built it with Zend Framework 1.12. Locally, i have set these parameters into application.ini file: resources.db.adapter = "pdo_mysql" resources.db.params.host = "localhost" resources.db.params.port = 3306 …
0
votes
1 answer

Dwoo does not echo strings with utf8 characters

I have got a strange problem with Zend Framework - I fetch data from MySql table that is set to utf8_general_ci. I inserted some data with polish fonts like ś ę ż... and push that data to view (Dwoo). {foreach $units unit} …
hsz
  • 148,279
  • 62
  • 259
  • 315
0
votes
2 answers

Strange error with zend frame work

Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[28000] [1045] Access denied for user 'liveaide_dbuser1'@'lynx-u.znetindia.net' (using password: YES)' in…
Nisanth Kumar
  • 5,667
  • 8
  • 33
  • 43
0
votes
1 answer

multiple select in ZendFramework

I want to select values from 2db. image_db => id, image_adress, category, product_id; product_db => id, name, price; I want to select the images from a particular category and for each image the data of the product what should i do? this is…
Rbrt Gmn
  • 13
  • 3
0
votes
2 answers

Unable to delete a record through Zend_Db_Table_Abstract->delete()

I am trying to delete a record through a delete action using zend framework Model. i am still unable to figure out why its not deleting and the $model->delete() always returns zero. (0) this is my delete action code. public function…
dev1234
  • 5,376
  • 15
  • 56
  • 115
0
votes
2 answers

ZF2: How to do this simple query with Zend\Db

I have the following statements but they return an empty result set: $sql = 'SELECT * FROM `industry` WHERE `code` LIKE ?'; $statement = $this->getAdapter()->createStatement($sql, array('A_')); $statement->execute(); What am I doing…
DatsunBing
  • 8,684
  • 17
  • 87
  • 172
0
votes
1 answer

Help With Select Query In ZF

Ok. This version of select works: $select = $this->select(); $select->setIntegrityCheck(false); $select->from(array('u' => $this->_name), array('u.id', 'u.username', 'u.avatar_path', '(SELECT…
Richard Knop
  • 81,041
  • 149
  • 392
  • 552
0
votes
1 answer

Zend Framework error [database connection]

Today trying to run my project coded under Zend Framework, and connected to a remote database, i got those 2 errors: PDOException: SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period…
Ahmadhc
  • 173
  • 1
  • 13