glickjd has asked for the wisdom of the Perl Monks concerning the following question:
'SELECT number, date, miles, purpose
FROM mileage
WHERE date BETWEEN ? and ?
ORDER BY date'
Now for some reason this won't order by the date. It returns the correct rows (rows with dates between the selected dates), but they are out of order. If I take out the Where clause, it will order by dates just fine. The following sql statement works and orders by the date:
'SELECT number, date, miles, purpose
FROM mileage
ORDER BY date'
Any ideas what I'm doing wrong here and how I can get that where clause in there? Let me know if you need any further details. Thanks for your help
Jeremy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI SQL problem
by Zaxo (Archbishop) on Sep 22, 2002 at 18:57 UTC | |
by glickjd (Novice) on Sep 22, 2002 at 19:42 UTC | |
|
Re: DBI SQL problem
by rir (Vicar) on Sep 22, 2002 at 23:18 UTC | |
|
Re: DBI SQL problem
by diotalevi (Canon) on Sep 22, 2002 at 19:58 UTC | |
by Aristotle (Chancellor) on Sep 22, 2002 at 20:55 UTC | |
by diotalevi (Canon) on Sep 22, 2002 at 23:02 UTC | |
by Ryszard (Priest) on Sep 23, 2002 at 07:23 UTC | |
|
Re: DBI SQL problem
by @ncientgoose (Novice) on Sep 23, 2002 at 00:19 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |