Resource ID #6

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aace
Forum Newbie
Posts: 2
Joined: Thu Jul 01, 2004 9:37 am

Resource ID #6

Post 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.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

you need to get the data out of the recourse id.

Code: Select all

$data = mysql_result(mysql_query($testingTimeOutTotal), 0,0);
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Post Reply