If you are using MySQL 5.0+ you should be able to write a stored procedure. I've never used WinSQL Lite, but assume that it has the capability to do this. If you're on an older version of MySQL, maybe WinSQL Lite can store scripts???
Also, just as an aside, what are you using the temporary date table for? If you're just using it to create a date range based on one date, you could do something like:
Code:
SELECT *
FROM mytable
WHERE thedate
BETWEEN DATE( '2005-11-1' )
AND DATE_ADD( '2005-11-1', INTERVAL 31 DAY )