I am trying to pull data out of a mysql database. The data is the date. Right now it's stored as a date type in mysql. So today is 2004-07-04, I need to find the record in the db with that in the date field. Here is my query..
$testingTimeOutTotal = "SELECT TimeOut FROM TestTime WHERE Dat = NOW() AND TimeIn = 0";
I was trying CURDATE(), but that didn't work, gave me the same Resource ID #6 problem.
Right now in the db,, I have one record, Dat = 2004-07-04 , TimeIn = 0, and TimeOut = 1088688433.
I need to get that TimeOut number.
I am making an employee clockin/clockout script, but just learning php and mysql.
Thank you.
Resource ID #6
Moderator: General Moderators
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
you need to get the data out of the recourse id.
Code: Select all
$data = mysql_result(mysql_query($testingTimeOutTotal), 0,0);This might help: http://www.devnetwork.net/forums/viewto ... 7&start=18