I have a problem about strotime() function.
My code like below; (PHP PDO MySQL)
$BasketLastDate = date('Y-m-d H:i:s',strtotime('+7 minutes'));
$BasketLastDate = strtotime($BasketLastDate);
$sepetONAY = 0;
$sg = "SELECT * FROM baskets WHERE approve=1 and checkout=0";
foreach($db->query($sg) as $basketDetails){
$BasketDate = $basketDetails['basket_date'];
$BasketDate = strtotime($BasketDate);
// If the basket older than 7 minutes
if ($BasketLastDate < $BasketDate){
// code....
}
The code should look all rows and change situation if the record older than 7 minutes. But it doesn't happened.
Please help me guys.