Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 30th, 2004, 02:54 PM
Registered User
 
Join Date: Mar 2004
Location: Washington, DC, .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dcsteve72 Send a message via Yahoo to dcsteve72
Default Date () function in MySQL query

I'm trying to execute a query to a MySQL database. The intended result is to return all rows where the date field has a date equal to or greater than todays date.

Here's the query:

SELECT * FROM Seminars WHERE Seminar_Date >= '" & Date() & "' ORDER BY Seminar_Date ASC

For some reason, the query is returning all rows in the table vs. just the rows from today forward.

Any thoughts?

-Steve

 
Old March 30th, 2004, 07:05 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

have you checked you system date time settings are correct? Your statement looks ok to me.

If you hard code a date, do you get the results you want?

BTW: A statement defaults to ASC, there is no need to include it.

Wind is your friend
Matt




Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql function ashuphp MySQL 1 April 18th, 2007 11:35 PM
Problem MYSQL password() Function everetts PHP Databases 2 March 23rd, 2007 11:34 PM
function syntax on Mysql robprell MySQL 0 May 15th, 2006 04:10 PM
Date based query when date is nvarchar MichaelTJ SQL Language 4 January 12th, 2004 09:57 PM
Convert String Date to Date for a SQL Query tdaustin Classic ASP Basics 4 July 7th, 2003 06:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.