|
|||
|
Hi,
Can anyone help with understanding operator precedence with Zend_Db_Select; The query I want to execute is SELECT * FROM myTable WHERE a = 1 AND (b = 0 OR c = 0 OR d = 0); I've tried a few combinations of: $sql = $this->_db->select(); $sql->from('myTable', *); $sql->where('a = ?', 1); $sql->orwhere('b = ?', 0); $sql->orWhere('c = ?', 0); $sql->orwhere('d = ?', 0); $sql = $this->_db->select(); $sql->from('myTable', *); $sql->orwhere('b = ?', 0); $sql->orWhere('c = ?', 0); $sql->orwhere('d = ?', 0); $sql->where('a = ?', 1); etc... But I can't get it right. Thanks Andrew |
|
|||
|
|
|
|||
|
Quote:
Thanks again, Andrew |
![]() |
| Thread Tools | |
| Display Modes | |
|
|