Writing a subquery using zend db?



Writing a subquery using zend db?..

Answer / Aditya Verma

To write a subquery using Zend_Db_Select, you can use the `__toString()` method to build your query and nest select statements. Here's an example:

```php
$subQuery = $db->select()->from('table1')
->where('id IN (?)', $ids);
$query = $db->select()
->from('table2')
->join($subQuery, 'table2.id = table1.id');
```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Zend Interview Questions

Who developed the zend framework?

1 Answers  


How to install zend framework?

1 Answers  


Explain why are in-built libraries used for the web services?

1 Answers  


Tell me what are the steps kept in mind while designing the zend_form?

1 Answers  


What is zend helpers?

1 Answers  


Suppose your Zend engine supports the mode Then how can u configure your PHP Zend engine to support mode?

1 Answers  


What is zend framework?

1 Answers  


What are the ways in which the file can be detected as being uploaded or not?

1 Answers  


What is zend framework? What is the use of it?

1 Answers  


What is full form of cla in zend framework?

1 Answers  


Explain the working with form elements in array notation?

1 Answers  


Explain what is the difference between zend_auth and zend_acl?

1 Answers  


Categories