• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to generate queries based on date

#6
[eluser]tusukgigi[/eluser]
help me !!!

$sql = "SELECT dateflag, COUNT(dateflag) AS num_stats
FROM stat
WHERE MONTH(dateflag)=MONTH(NOW()) AND YEAR(dateflag)=YEAR(NOW())
GROUP BY dateflag";

return $this->db1->query($sql);

echo intval($list['num_stats'])."<br />";


i got error:
Fatal error: Cannot use object of type stdClass as array in D:\xampp\htdocs\learn\system\application\controllers\statistik.php on line 127


Messages In This Thread
how to generate queries based on date - by El Forum - 07-30-2010, 01:52 AM
how to generate queries based on date - by El Forum - 07-30-2010, 02:22 AM
how to generate queries based on date - by El Forum - 07-30-2010, 05:02 AM
how to generate queries based on date - by El Forum - 07-30-2010, 05:06 AM
how to generate queries based on date - by El Forum - 07-30-2010, 05:27 AM
how to generate queries based on date - by El Forum - 08-02-2010, 01:27 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.