zend-db Questions

4

Solved

I searched the Web and could not find anything that would show me a good solid example. My question is basically this: How do I convert this: SELECT * FROM table WHERE ((a = 1 AND b = 2) OR (c = ...
Traveled asked 14/4, 2010 at 18:44

2

I'm using BjyAuthorize with Zend Framework2 to implement authorization and was able to successfully integrate roles from database. Now I want to get my Rules and Guards also from data base tables. ...
Rufus asked 16/8, 2013 at 2:0

4

I'm inserting a new row into my database with this code: $data = array( 'key' => 'value' ); $this->getDbTable()->insert($data); How can I get the row id of the this row that I just cre...
Militarism asked 8/12, 2009 at 18:4

3

Solved

Normally, this would work for me: $db = Zend_Db_Table::getDefaultAdapter(); $where = $db->quoteInto('id = ?', $id); $db->delete('tablename', $where); but I have to match two ids. So I don'...
Sse asked 4/12, 2009 at 6:5

3

Solved

I am using the Zend framework 2.x and facing the problem as I have search a lot. I want to use the like clause in query but each time gives the errors: Here is my efforts: $sql = new Sql($this-&g...
Angry asked 22/3, 2013 at 15:25

1

Solved

I'm trying to do something relatively simple but can't figure it out. I just want to add to a current value in the DB is there anyway to do the equivalent of a: UPDATE `tablename` SET fieldB = fi...
Bunsen asked 24/6, 2013 at 16:2

2

Solved

I want to make this query using Zend\Db\Sql\Select: SELECT table1.* FROM table1 INNER JOIN table2 ON table1.columnA = table2.columnB INNER JOIN table3 ON table1.columnC = table3.columnD WHERE...
Recusancy asked 21/6, 2013 at 18:39

2

Solved

Please explain what Model Entity TableGateway Mapper Hydrator do and how it all works together in zf2 application. please don't give links to blogs articles. I need simple big picture explenat...
Kusin asked 17/5, 2013 at 8:21

5

Solved

How to get Column Name With Zend DB
Officialdom asked 2/4, 2009 at 8:18

2

Solved

i really don't get the point how to use predicates in zend framework 2. this is what i got: $sql->select() ->columns(array('GroupedColum' ,'minValue' => new Expression('min(ValueColumn...
Baudekin asked 26/9, 2012 at 21:39

2

Solved

I have just started learning Zend Framework 2 as a long time Zend Framework 1 developer. I am having a little trouble wrapping my head around the new terminology. Back in ZF1, if I wanted to creat...
Mardis asked 14/2, 2013 at 19:23

4

Solved

So you can use something like this: $query = $db->select(); $query->from('pages', array('url')); echo $query->__toString(); to examine the sql that the Zend Db Framework is going to use...
Overtrump asked 17/6, 2009 at 21:36

5

Solved

I'm parsing a json feed routinely and need to insert only the newest users from the feed and ignore existing users. I think what I need is ON DUPLICATE KEY UPDATE or INSERT IGNORE based on some se...
Reminisce asked 31/10, 2009 at 11:25

2

Solved

I'm just wondering what the syntax is to do a db select in Zend Framework where two values are true. Example: I want to find if a user is already a member of a group: $userId = 1; $groupId = 2; $d...
Euthenics asked 4/12, 2009 at 2:37

1

Solved

How can i specify Zend Db Table Select to fetch a dummy column. i want to generate sql like this SELECT 'ABC' AS xyz , name FROM employee Edit: I have tried this $select->from('employee',...
Hierodule asked 8/12, 2012 at 22:14

1

Solved

Actually I'm working on a project and I'm looking on how Zend Framework 2 handle complex queries (expecially on how to join n:m tables and how to use GROUP_CONCAT and other functions). Do you know ...
Cageling asked 29/11, 2012 at 13:7

1

Solved

I am using Zend Framework for my PHP developments and here is a small function I used to execute a query. This is not about an error. The code and everything works fine. But I want to know some con...
Idiocrasy asked 21/9, 2012 at 2:58

4

Solved

I'm trying to use fetchAll on a query that has 2 variables. I can't figure out the syntax. I can manage with only 1 variable: $sql = "SELECT * FROM mytable WHERE field1 = ?"; $this->_db->fet...
Clostridium asked 8/7, 2010 at 9:11

7

Solved

I am slowly building up my Zend skills by building some utility websites for my own use. I have been using Zend Forms and Form validation and so far have been happy that I have been understanding t...
Butane asked 1/2, 2010 at 22:51

2

Solved

I'd like to do a Zend db update with an OR clause. What would be the equivalent statement to: UPDATE mail SET message_read = 1 WHERE id = 5 OR id = 10
Verified asked 27/6, 2012 at 22:53

3

Solved

Using Zend Framework, is there a way to pass multiple conditions to an update statement using the quoteInto method? I've found some references to this problem but I'm looking for a supported way wi...
Tribune asked 12/6, 2011 at 10:41

2

Solved

Assuming I have $db is an instance of Zend_Db_Adapter_Abstract and $sql = 'SELECT blah blah FROM table' will return a huge number of records. There are two code fragments to process the returned...
Fragile asked 5/5, 2012 at 20:59

1

Solved

I'm using Zend Framework 1.11.4 and also Zend_Db. The problem is, I have a column for sex which has the value 0 or 1(BIT(1)), when I put false the insertion is fine, but when I put true the followi...
Harrington asked 6/1, 2012 at 3:9

5

Solved

I'm trying to fetch the last inserted row Id of a Sqlite DB in my PHP application. I'm using Zend Framework's PDO Sqlite adapter for database handling. the lastInsertId() method is supposed to give...
Marucci asked 3/2, 2009 at 5:51

3

Solved

Can someone give me an example of how I would delete a row in mysql with Zend framework when I have two conditions? i.e: (trying to do this) "DELETE FROM messages WHERE message_id = 1 AND user_id...
Indoaryan asked 22/5, 2009 at 20:38

© 2022 - 2024 — McMap. All rights reserved.