Hello,
I've scoured the boards, I'm still a little confused on subtracting dates. I have dates in MySQL which correspond to dates when problem tickets were open (helpdesk). I want to see how many days old the ticket is, (ie. today's date - opened date = number of days) and post in a table
Here's my code so far...(date in MySQL is format 2003-08-06)
<?php
$today=date("m/d/y");
$query = "SELECT * FROM data";
$result = mysql_query($query) or die ("Couldn't execute, man.");
while ($row = mysql_fetch_array($result))
{
extract($row);
$opendate = $row["calldate"];
/ From here I'm lost, I would assume my calculation
$today - $opendate = $daysopen
would be here...
/
/ Then my table goes here, displaying the variables pulled
/
}
Any ideas? Thanks in advance....
Scott