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 DbTable case insensitive

I have a login system for my webapp that works well using the Zend auth adapter but the problem is I want the email to be case insensitive when a user logs in. I am using Oracle as the back end DB and normally I would user the…
Kal
  • 2,239
  • 6
  • 36
  • 74
0
votes
3 answers

Zend Framework 2 Zend\Db\Sql\Sql - prepareStatementForSqlObject vs getSqlStringForSqlObject

In reading the Zend Framework 2 Documentation: http://framework.zend.com/manual/2.0/en/modules/zend.db.sql.html two examples are given on how one might query data from the Database. For reference, they are: To prepare (using a Select object): use…
Derrick
  • 336
  • 5
  • 18
0
votes
0 answers

Zend_Db - define not done before fetch or execute and fetch

I have a send_mail() procedure in Oracle that handles all the emails. I can call that procedure from a Zend query with no errors $db->query("blah blah"); but when I use a $stmt = $db->prepare("blah blah"); I get the error (though the email still…
Kal
  • 2,239
  • 6
  • 36
  • 74
0
votes
1 answer

Save data from a form collection

I have been following http://framework.zend.com/manual/2.1/en/modules/zend.form.collections.html and it works great with validation and so on. When the form is valid the guide just runs a var_dump on the entity and it looks something like…
Rickard
  • 620
  • 2
  • 7
  • 23
0
votes
1 answer

Zend Framwork Session on Internet Explorer

Still couldn't make it works after post this link: Zend framework session lost I have this Sign up form that allow users to register and redirect them right away to their pages. All work great on every browsers except INTERNET EXPLORER. I have tried…
Ya Fa Su
  • 160
  • 1
  • 4
  • 13
0
votes
1 answer

Zend Framework create a sql function

I would like to create a sql query in Zend Framework in the Abstract.php or in model? but I have a hard time figure out how to do it. I am new in zend framework. The query that I want to create looks like that: delete from users where id not…
Ya Fa Su
  • 160
  • 1
  • 4
  • 13
0
votes
2 answers

How do I ignore the created column on a Zend_DB table save?

how would I ignore having Zend_DB save() from trying to fill out a created column? I do not need that column for a certain model.
Darren
  • 10,631
  • 8
  • 42
  • 64
0
votes
2 answers

Zend error SQLSTATE[HY000] [1045]

I am having trouble with zend framework and connection with database, I'm trying to create a login, the table is created, and the code apparently is fine, but gives me this: An error occurred Application error Exception information: Message:…
Hugo Silva
  • 23
  • 1
  • 10
0
votes
1 answer

Zend_Db_Table_Abstract and Default Scope

Is there a way to add a default scope to a Zend_Db_Table_Abstract based model. I want to be able to query a model with some conditions taken as default. e.g. deleted = false order name asc
user138095
0
votes
1 answer

Zend Framework DB delete method strips values

Im trying to delete record from database depending where conditions. The query is pretty simple, but still Im getting strange results. What Im trying to do in ZF: $where = array( $db->quoteInto('name = ?', $name), …
Bounce
  • 2,066
  • 6
  • 34
  • 65
0
votes
1 answer

PHP PDO error in Zend framework after a migration of a MSSQL SERVER with an error Connection

After a planned migration of the old MSSQL Server professional to the last MSSQL Server Express version, I have a problem with the connection with an old PHP project that use Zend framework to connect on MSSQL server I suppose with PDO library. the…
0
votes
1 answer

mySQL statement in Zend Framework DB_TABLE

I'd like to know how to properly write mySQL statement using ZEND in this case: SELECT * FROM `users` WHERE role_id = 2 AND status = 2 AND bddate BETWEEN '1988-05-07' AND '1991-01-01' ORDER BY lastname DESC I'll have if statements, for ex. if in…
mrGott
  • 1,066
  • 3
  • 18
  • 53
0
votes
2 answers

Zend framework 2 - how do i connect to database and retrieve query results?

I have ZF2 tried following, but it does not give any query results with ZF1 works, ZF2 not workings. Is ZF2 database adapters incomplete, left as bug not resolved by ZF2 itself? Cause documentation tells to do so but it simply not working. Does ZF2…
user285594
0
votes
1 answer

Cannot retrieve rows from Zend_Db_Table_Rowset

I have successfully fetched a rowset from my database table unto the view script. I did a var_dump($result) on the view script to confirm. But I am unable to fetch the individual rows to properly display their contents. result) …
okey_on
  • 2,888
  • 8
  • 28
  • 36
0
votes
1 answer

Zend DB Expr getting values from previous join

I have the following code in a zend db query ->join(array('z' => new Zend_Db_Expr('(' . $this->_dbhInstance->select()->from('zipcode', array('lat', 'lon', 'zip')) ->group('zip') . ')')), 'zip = f.zipcode') …