Webmaster Forum

Sponsored Reviews   High Bandwidth Dedicated Servers   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 12-13-2007, 03:12 PM   #1 (permalink)
Contributing Member
 
Foxtrck's Avatar
 
Join Date: 11-29-06
Location: Scotland, UK
Posts: 184
iTrader: 0 / 0%
Latest Blog:
None

Foxtrck is liked by somebodyFoxtrck is liked by somebodyFoxtrck is liked by somebodyFoxtrck is liked by somebodyFoxtrck is liked by somebody
Send a message via MSN to Foxtrck
Question CFML::Simple Query for date functions need help plz

Hi,

What I am trying to achieve is a query that will list dates for football games for a specific team, I want the query to auto update itself if all the dates are in the DB. Basically if the date on the fixture has already been it shouldn't show, there should only be future dates. I've used:

Code:
<CFQUERY NAME="SHOWTEAMFIXTURES" DATASOURCE="x"> SELECT * FROM ontheball_fixtures WHERE HometeamID =#ID# OR AwayteamID=#ID# ORDER BY Date DESC </cfquery>
I tried adding

Code:
AND Date > now()
as It seemed pretty logical but it deosn't like this. Anyone give me any pointers?
__________________
http://www.dund.co.uk - DD1 Designs
Foxtrck is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 12-15-2007, 09:38 AM   #2 (permalink)
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 358
iTrader: 0 / 0%
Latest Blog:
None

Boogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebodyBoogle is liked by somebody
You need a variable which is tapped into the System.DateTime.Now() and then you would use this variable in your query:

Code:
<CFQUERY NAME="SHOWTEAMFIXTURES" DATASOURCE="x"> SELECT * FROM ontheball_fixtures WHERE HometeamID =#ID# OR AwayteamID=#ID# AND Date > #Variable# ORDER BY Date DESC </cfquery>
HTH's

Boog's
__________________
Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB 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
functions.php - Decoding? Jason Coding Forum 2 11-14-2006 07:30 AM
Need simple PHP date output.. POR-15 Depot Coding Forum 7 03-05-2004 01:15 PM
functions kwvarga Coding Forum 0 01-24-2004 07:06 PM
simple show date and adjust timezone I, Brian Coding Forum 31 01-14-2004 12:54 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 02:34 AM.
© Copyright 2008 V7 Inc


Search Engine Optimization by vBSEO 3.1.0 ©2007, Crawlability, Inc.