Manuelandro
23-01-2007, 01:46
ciao ragazzi
ho la seguente query
$qis = "SELECT UNIX_TIMESTAMP(CURRENT_TIMESTAMP() - UNIX_TIMESTAMP(ultimazione)) AS Azione FROM tab";
$ris = mysql_query($qis, $db);
$wer = mysql_fetch_array($ris);
echo"$wer[Azione]";
dove ultimazione è un datetime con valore 2007-01-23 00:49:05
quindi in pratica ho fatto una sottrazione tra il timestamp corrente e questo datetime formattato apputn in timestamp.
putroppo mi stampa sempre 0.
come mai?
thx
ho la seguente query
$qis = "SELECT UNIX_TIMESTAMP(CURRENT_TIMESTAMP() - UNIX_TIMESTAMP(ultimazione)) AS Azione FROM tab";
$ris = mysql_query($qis, $db);
$wer = mysql_fetch_array($ris);
echo"$wer[Azione]";
dove ultimazione è un datetime con valore 2007-01-23 00:49:05
quindi in pratica ho fatto una sottrazione tra il timestamp corrente e questo datetime formattato apputn in timestamp.
putroppo mi stampa sempre 0.
come mai?
thx