Code: Select all
<?PHP
$result = mysql_query( "SELECT * FROM ttime where (SNUM = '".$_SESSION['SNUM']."') and TIDATE = Date() ORDER BY TIDATE DESC")
or die("SELECT Error: ".mysql_error());
$num_rows = mysql_num_rows($result);
print "You currently have $num_rows time entries for today.</font><P>";
?>The practical reason for doing this is the user SNUM adds time records for time spent on various activities throughout the day into the table ttime. My query is intended to allow the user to query the database to create a record set of those records they have added today. I am stumped as to how to get the query to use today's date in the mm/dd/yyyy format as a parameter. Any and All Help is Appreciated!
feyd | Please use
Code: Select all
tags when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]