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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -