Logo F2FInterview

Zend Framework Interview Questions

Q   |   QA

Actually, by default, if your expression includes parentheses, Zend_Db_Select will cast the statement appopriately. However, if it does not, or you are having problems, you can useZend_Db_Expr to explicitly create the expression:
* Build the SQL:
* SELECT p."product_id", p.cost * 1.08 AS cost_plus_tax
* FROM "products" AS p
$select = $db->select()
->from(array('p' => 'products'),
'cost_plus_tax' => new Zend_Db_Expr('p.cost * 1.08'),

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: