InterviewSolution
Saved Bookmarks
| 1. |
I Want To Use A Sql Function Or Perform Calculations In A Statement Fm Generating With Zend_db_select. How Can I Do This? |
|
Answer» Actually, by default. if your expression includes parentheses, Zend_Db_Select will cast the STATEMENT appropriately. However, if it does not, or you are having PROBLEMS, you can use Zend_Db_Expr to explicitly create the expression: * BUILD the SQL: SELECT p.product_Jd p.cost 1.08A5 costp/us_tax * FROM “products”AS p $se/ect $db->se/ect() ->from(array(‘p’=>‘products’), array( ‘product_id’, ‘cost_p/us_ TAX’>NEW Zendj2b_Expr(’p.cost*1.08), ));Actually, by default. if your expression includes parentheses, Zend_Db_Select will cast the statement appropriately. However, if it does not, or you are having problems, you can use Zend_Db_Expr to explicitly create the expression: |
|