RE: Query question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2006-10-29 at 01:05 -0500, Beauford wrote:
> This is what I finally figured out, which works just perfectly.
> 
> select count(date) as count, substring(date,8) as year from stats group by
> year;
> 
> Thanks to all for the input.

So what you're saying is that you're not using a date field, you're
using some kind of string concoction where the year information happens
to start at the 8th character? Now that gets me wondering what kind of
freaky date format you've used :) I mean I could naturally see the 5th
or 7th character being the start point for the year using the following
formats respectively:

    ddmmyyyy

    dd/mm/yyyy

But you're grabbing from the 8th character onwards which just seems
wierd.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux