mysql where condition doesn't show results in PHP -
i got mysql query works not in php
select rev_date, rev_currency, sum(rev_amount) total_amount daily_revenue year(rev_date) = year(curdate()) , month(rev_date) = month(curdate()) group rev_currency, year(rev_date), month(rev_date)
i tried in php until worked , looks doesn't , group conditions:
this fails:
where year(rev_date) = year(curdate())
this works:
where rev_date = year(curdate())
but doesn't give me results want.
any ideas?
i added mysql error (should have done right away) made clear, had this:
set global sql_mode=(select replace(@@sql_mode,'only_full_group_by',''));
now works.
Comments
Post a Comment