I would highly suggest using whatever programming language you're using
to compile this list, and not MySQL. Is there a reason you're doing this
in MySQL and not in the programming language itself?
Marcin Szkudlarek wrote:
That's a correct solution but unfortunately not for this problem.
The query shouldn't use any table.
On 15/02/07, Ellen Coen <[EMAIL PROTECTED]> wrote:
SELECT * FROM tablename WHERE datefield BETWEEN '2007-01-15' AND
'2007-01-24' ;
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marcin Szkudlarek
Sent: Thursday, February 15, 2007 4:19 AM
To: [email protected]
Subject: [mysql] question about date range
Hi all,
How i can produce a range of dates with a query?
For example: for a given 2 dates: 2007-01-15 and 2007-01-24 the
following output should be generated:
2007-01-15
2007-01-16
2007-01-17
2007-01-18
2007-01-19
2007-01-20
2007-01-21
2007-01-22
2007-01-23
2007-01-24
Notice that there are 10 rows in the result.
Regards,
Marcin
_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php