in reply to Perl and MySQL woes

Side comment:
SELECT sum(numlog) FROM table1 WHERE date >= 20071204 AND date < 20080 +112
Can also be written as:
SELECT sum(numlog) FROM table1 WHERE date BETWEEN 20071204 AND 2008011 +2
--Darren

Replies are listed 'Best First'.
Re^2: Perl and MySQL woes
by KurtSchwind (Chaplain) on Jan 13, 2008 at 14:15 UTC

    Further Side Comment:

    You can use BETWEEN on date field types, not just INT. So if this entire thing was done so that he could use <= and => he could have done that with date field types directly.

    --
    I used to drive a Heisenbergmobile, but every time I looked at the speedometer, I got lost.
Re^2: Perl and MySQL woes
by cosmicperl (Chaplain) on Jan 13, 2008 at 03:48 UTC
    Thanks Darren, I'll see if that speeds things up