2010年6月29日星期二

Re: [fw-db] raw SQL to Zend_Db_Select ?

Thanks guys, this is helpful.

On Mon, Jun 28, 2010 at 2:37 PM, Bill Karwin <bill@karwin.com> wrote:

By the way, I would think if you have a fully-formed SELECT query, there's little reason to convert it to a Zend_Db_Select object.  I suppose this gives you the ability to add more joins or conditions or whatever, but that seems like a pretty rare use.

There's a helluva lot of joining and some conditional logic in the basic query and I want to be able to add more WHERE based on user input. I think it's an ideal scenario for a private|protected method or variable to provide you with a Zend_Db_Select for further refinement. There's also likely to be Zend_Paginator involved, which plays so nicely with Zend_Db_Select.
 

There are no practical limits on how complicated an expression you can represent in a Zend_Db_Expr object.  


Cool. Thanks again.


--
Support real health care reform:
http://phimg.org/

--
David Mintz
http://davidmintz.org/


没有评论: