Zend DB returning NULL value
Posted
by davykiash
on Stack Overflow
See other posts from Stack Overflow
or by davykiash
Published on 2010-03-31T13:13:59Z
Indexed on
2010/03/31
13:33 UTC
Read the original article
Hit count: 623
I have the following query that extends from Zend_DB_Table_Abstract
$select = $this->select()
->from('expense_details',
array('SUM(expense_details_amount) AS total'))
->where('YEAR(expense_details_date) = ?', '2010')
->where('MONTH(expense_details_date) = ?', '01')
->where('expense_details_linkemail = ?', '[email protected]');
However it returning a NULL value despite its "equivalent" returning the desired value
SELECT SUM(expense_details_amount) AS total FROM expense_details
WHERE
YEAR(expense_details_date) = '2010'
AND MONTH(expense_details_date) = '01'
AND expense_details_linkemail = '[email protected]'
Is my Zend_DB_Table construct above correct?
© Stack Overflow or respective owner