Possible Duplicate:
Why do I get “Resource id #4” when I apply print_r() to an array in PHP?
Pardon this simple question, however I am a rookie to SQL and PHP. Simply enough I am trying to get the value of a cell that I know the column it is in as well as the row it's in so I can use that value in a simple subtraction problem. Here is what I have:
$outtime = mysql_query("SELECT `Event1CheckOut1`
FROM attendance
WHERE ID = '1234'");
$intime = mysql_query("SELECT `Event1CheckIn1`
FROM attendance
WHERE ID = '1234'");
$dur = $outtime - $intime;
Using echo it returned the result for the first one as "Resource id #4". Doing some research I think this may be because it is returning to me a table of the results not simply a value. It may be worth noting that the values I am trying to fetch are times in a 24 hour format.