SunQuest
 
           PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old July 14th, 2004, 11:40 AM
Scot Scot is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 29 Scot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 17 sec
Reputation Power: 0
Setting parameter in a query to today's date

Does anyone know how to set up a parameter in a query to equal today's date? I have scoured the internet for some time and scanned the archives but to no avail. Any and all suggestions welcome. Here is the code I have so far.....

$result = mysql_query( "SELECT * FROM ttime where (SNUM = '".$_SESSION['SNUM']."') AND TIDATE = ?today's date? ORDER BY TIDATE DESC")

Reply With Quote
  #2  
Old July 14th, 2004, 01:14 PM
Gibb Gibb is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 1 Gibb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
you might want to try:
TIDATE = NOW()

tho that might not be the proper formatting that you need.
The NOW() command simply inserts the current system date/time
into the variable.

Reply With Quote
  #3  
Old July 15th, 2004, 04:29 AM
clawdragos clawdragos is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 5 clawdragos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
please tell us what are you using: MySQL, MSSQL, bacause the data types are not the same. Also be carefull if you installed the SQL Server in other language then english

Reply With Quote
  #4  
Old July 18th, 2004, 07:27 AM
Pheifel Pheifel is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: Denmark
Posts: 174 Pheifel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 46 sec
Reputation Power: 5
Send a message via MSN to Pheifel
hi. I suggest, that you do following:

if you are using the timedate-stamp in the db use this:
PHP Code:
 $time date("Y-m-d G:",time()) 

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Setting parameter in a query to today's date


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway