zend-db Questions

7

I have an array with information which looks more or less like this: $data[] = array('content'=>'asd'); $data[] = array('content'=>'asdf'); And I want to add both entries into the Database...
Polled asked 3/5, 2009 at 12:17

3

Solved

I'm trying to do this query using Zend DB select but I'm not able to do so This is the sql query select shopping_id,shopping_details,"friend" as type from shopping Notice here how I'm specifyi...
Phantasmagoria asked 22/7, 2010 at 2:56

4

Are there any ways to convert Zend db Select or Zend DB query to SQL query before querying the database? Any other workarounds? As I want to build a more complex SQL query that Zend DB cannot han...
Bugleweed asked 31/8, 2012 at 23:48

5

Solved

I am trying to get my ZEND application up on my apache server running on UNIX. Initially my host didnot give PDO support ,and i got it enabled by requesting them with a mail.But now I am getting an...
Ministry asked 12/7, 2009 at 9:42

4

Solved

The ZF1 Zend_Db reference manual has an entire section on performing transactions. The ZF2 Zend\Db reference manual lacks any documentation on transactions. How do I perform transactions in ZF2? ...
Leventhal asked 12/12, 2012 at 1:53

14

Solved

I have the following piece of code which i taken from model, ... $select = $this->_db->select() ->from($this->_name) ->where('shipping=?',$type) ->where('customer_id=?',$use...
Maryn asked 11/10, 2011 at 9:4

7

Solved

I usualy use Zend_Validate_Db_RecordExists to update or insert a record. This works fine with one field to check against. How to do it if you have two fields to check? $validator = new Zend_Valid...
Schoolbook asked 19/5, 2011 at 13:48

4

Solved

How can I use the distinct clause with Zend\Db\Sql\?
Kaneshakang asked 11/3, 2013 at 20:34

6

Solved

So I am trying to accomplish something like this: SELECT * FROM table WHERE status_id IN (1,3,4); using Zend_Db_Select... can't find how to do it :( Is it at all possible?
Highup asked 4/12, 2008 at 6:26

4

Solved

Is there any way to include MySQL expressions like NOW() in the current build of ZF2 (2.0.0beta4) through Zend\Db and/or TableGateway insert()/update() statements? Here is a related post on the ma...
Craftsman asked 25/6, 2012 at 3:11

4

Solved

I want to generate this complex WHERE clause in Zend_Db: SELECT * FROM 'products' WHERE status = 'active' AND ( attribute = 'one' OR attribute = 'two' OR [...] ) ; I've tried t...
Sabadilla asked 7/12, 2010 at 23:5

2

Solved

I have followed an example and would like to pass the Database adapter to a fieldset to create a drop down menu. The code below is how i call the fieldset. How can i access the database adapter i...
Bechuana asked 21/1, 2017 at 17:41

5

Solved

variable $tablemodel in an instance of a model which extends Zend_Db_Table_Abstract, if i do $tablemodel->insert($data) to insert data. Is there any method or property to get last insert id?...
Varix asked 30/1, 2011 at 9:7

3

Solved

I'm selecting records from a database using the equivalent of this query: SELECT * FROM reports WHERE user_id IN (3, 6, 22); The function calling fetchAll() has an argument that's an array of th...
Thermotherapy asked 17/2, 2010 at 20:55

3

Solved

have such zend query: $select = $this->_table ->select() ->where('title LIKE ?', '%'.$searchWord.'%') ->where('description LIKE ?', '%'.$searchWord.'%') ->where('verified=1 AND ...
Matri asked 21/8, 2010 at 7:40

4

Solved

I am developing a web application using zend framework. For select statements I have used following way. Ex: public function getData($name) { $sql = "SELECT * from customer where Customer_Name =...
Auguste asked 31/12, 2011 at 2:17

1

Solved

The goal: Unit test an InputFilter in Zend Framework 2. The problem: A mocked DbAdapter is needed. As I am relatively new to Unit Testing I just got started with mocking classes. After doing a lo...
Clamant asked 11/12, 2015 at 13:48

1

Solved

I have a little problem when creating tests with PHPUnit. Here is my setup : protected function setUp() { $serviceManager = Bootstrap::getServiceManager(); $this->mockDriver = $this->get...
Cultivated asked 7/9, 2015 at 12:40

6

Solved

I am using select like this and it is fetching record successfully: $table = new Bugs(); $select = $table->select(); $select->where('bug_status = ?', 'NEW'); $rows = $table->fetchAll($sel...
Joon asked 4/11, 2010 at 13:43

3

Solved

In sql i am using union i don't know how to write it in zend db. select m.*, 0 as is_shared from test m where user_id = $userId union select m.*,1 as is_shared from test m join test_shares ms w...
Corkscrew asked 18/11, 2011 at 11:35

1

Solved

Basic question How can I fetch the 'type' column as integer value from inside the table mapper? I have a PHP Zend Framework 1.12 application running a website. Inside MySQL are multiple tables wit...
Paranoiac asked 11/12, 2014 at 20:0

3

Solved

I want using Zend_Db without Zend_Framework. I want incorporate Zend_Db for my existing website that was not made using Zend Framework. Is it possible to use Zend_Db like this? Can you recomm...
Histo asked 30/1, 2011 at 3:18

5

Solved

I have here a medium sized intranet site which is written entirely in Zend FW. The database for the intranet is located on another server. Now I need to extend the intranet with some new functional...
Sorbose asked 4/10, 2009 at 12:59

4

Solved

I am newbie to zend framework and i am trying to configure the zend. I was sucessfully installed zendskeleton applicaion on window 7 and XAMPP After installation I am creating new module Album as ...

1

An error occurred Application error Exception information: Message: Select query cannot join with another table This is my code: <?php class Application_Model_DbTable_Seguimientos extends Zen...
Banister asked 5/7, 2014 at 21:38

© 2022 - 2024 — McMap. All rights reserved.