Re: Figuring Out the Best Day in stats program
| From: | Richard Lynch | Date: | Tue, 09 Jul 2002 05:33:51 +0000 |
| Subject: | Re: Figuring Out the Best Day in stats program | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-106288@lists.php.net to get a copy of this message | ||
><?
>$query = "select count(*) as monthly_views from visitors group by
>extract('year', time), extract('month', time) order by monthly_view desc
>limit 1";
>Warning: Supplied argument is not a valid MySQL result resource in
>C:\Inetpub\TecEco_PHP\stats_interface\summary.php on line 75
>You have an error in your SQL syntax near ''year', time),
>extract('month',
>> Dig through the manual of your database (you didn't say which one) in the
>> Date/Time functions section, and see if you can find one that will extract
>> the year and month from a timestamp.
>> 1. 'extract' is probably not the right function name. You'll have to look
>> that up.
http://www.mysql.com/doc/D/a/Date_and_time_functions.html
--
Like Music? http://l-i-e.com/artists.htm