Zend Server Question: Download Questions PDF
How to write a program that performs the calculations using the SQL function?
Answer:
- The SQL functions are used to perform the calculations of the statements using the Zend_Db_Select command.
- The expression needs to have parentheses and the command that is given as Zend_Db_Select need to provide the statement appropriately.
- The Zend_Db_Expr is used to explicitly create the expressions that are given below:
$select = $db->select()
->from(array('p' => 'products'),
array(
'product_id',
'cost_plus_tax' => new Zend_Db_Expr('p.cost * 1.08'),
));
- The expression needs to have parentheses and the command that is given as Zend_Db_Select need to provide the statement appropriately.
- The Zend_Db_Expr is used to explicitly create the expressions that are given below:
$select = $db->select()
->from(array('p' => 'products'),
array(
'product_id',
'cost_plus_tax' => new Zend_Db_Expr('p.cost * 1.08'),
));
Download Zend Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain what is the procedure to see that the optional file is detected? | Can you explain what is the difference between Zend_Auth and Zend_Acl? |