我需要檢查日期+ 1個月的DB與正確的日期。我嘗試:UNIX_TIMESTAMP不正確的結果
$todayDate = date("Y-m-d");
$dateOneMonthAdded = strtotime(date("Y-m-d", strtotime($todayDate)) . "+1 month");
$result = mysql_query('SELECT UNIX_TIMESTAMP("date") AS date FROM followform WHERE id = "28"') or die(mysql_error());
$date = mysql_fetch_assoc($result);
if ($dateOneMonthAdded == $date['date']) echo 'nice';
但是$日期[ '日期'] == 0
如果我使用 - mysql_query('SELECT date FROM followform WHERE id = "28"')
$date['date'] == 2012-08-13
哪裏是我的錯?
@MichaelYounani:看[這裏](http://meta.stackexchange.com/a/110645/172011) – 2012-08-13 15:14:30