Text Formatted Code
function phpblock_happytimes ()
$sql = "SELECT SUM(times) FROM table WHERE DATE_SUB( CURDATE( ) , INTERVAL 31 DAY ) <= date GROUP BY WEEK(date) DESC LIMIT 4";
I get "Resource id #133" from the Home topic (125, 124, & 120 on other topics) in that block.
The SQL is legit and should return 2 rows of 1 field (does in phpMyAdmin). Admittedly I know little about php. Can anyone help?