Querying Dates

This is a discussion on "Querying Dates" within the Databases section. This forum, and the thread "Querying Dates are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 10th, 2007, 09:59
Junior Member
Join Date: Apr 2007
Location: Gloucester, UK
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Querying Dates

Hi there,

I am trying to write an SQL statement that will pull out all records in a database where the date is higher than or equil to the current date. I have this:

"SELECT * FROM `events` WHERE `from` >= NOW() ORDER BY `from` ASC LIMIT 1"

'from' is a date field (not datetime).

Which seamed to work until today. The script was meant to drop the current event today and replace it with the next in line. Well, it did it yesterday instead. Does anyone have any ideas on how I can get this to work properly?
Reply With Quote

  #2 (permalink)  
Old Apr 13th, 2007, 14:59
Junior Member
Join Date: Apr 2007
Location: Gloucester, UK
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Querying Dates

For anybody interested. I reset the server and it is now working perfectly.
Reply With Quote
Reply

Tags
mysql, now, remove past items, selecting dates

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
question about querying 2 databases in php sudhakararaog PHP Forum 1 Mar 11th, 2008 19:33
Querying Microsoft SQL server 2005 alexgeek Classic ASP 14 Sep 30th, 2007 01:28
Form Element has no properties when querying antonyx JavaScript Forum 13 Aug 25th, 2006 14:06
dates in SQL spinal007 Databases 3 Nov 10th, 2004 09:32
dates benbacardi Classic ASP 2 Sep 14th, 2004 16:18


All times are GMT. The time now is 12:38.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43