Page 1 of 1

Resource ID #6

Posted: Thu Jul 01, 2004 9:37 am
by aace
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.

Posted: Thu Jul 01, 2004 10:33 am
by d3ad1ysp0rk
you need to get the data out of the recourse id.

Code: Select all

$data = mysql_result(mysql_query($testingTimeOutTotal), 0,0);

Posted: Thu Jul 01, 2004 10:35 am
by patrikG