View Single Post
Old 12-13-2007, 03:12 PM   #1 (permalink)
Foxtrck
Contributing Member
 
Foxtrck's Avatar
 
Join Date: 11-29-06
Location: Scotland, UK
Posts: 209
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   Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links