Firstly, I should state I am a major newb. I'm trying to calculate the difference between two dates in a table. The table has two fields 'qdate', and 'currdate' set up as timestamps. All I'm trying to do is figure out the difference between the two dates in the fields.
I've tried timestampdiff with no luck. So now I'm trying it this way but I get the result 0. Am I missing something simple here?
PHP Code:
$result = mysql_query("SELECT *
FROM time");
$row = mysql_fetch_array( $result );
$currdate = $row[currdate];
$qdate = $row[qdate];
echo ($currdate - $qdate)