2011年1月15日星期六

[fw-db] Re: How can I group my queries with a Zend_Db_Select statement?

Ok, I think I found the answer. Let me know if this is the "right" way to do
it. I put everything I want inside the same conditional group in the same
where() call, like this:

$select = $select->where('firstname LIKE ? OR lastname LIKE ?', 'Paul');
$select = $select->where('gamedate ?', '2010-06-25');

This yields SQL with the firstname/lastname conditional inside a single set
of parentheses, just like I want.

Thanks for any feedback!
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/How-can-I-group-my-queries-with-a-Zend-Db-Select-statement-tp3219254p3219258.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: