In the database it is set for current_timestamp I am creating a script to run every hour that will compare the time from the Database then from local server see if it has been more than one hour so far I have this but confused where to go from here:
<?php
require('../config/dbconfig.php');
$sql = "SELECT * FROM stocks";
$result = mysqli_query($dbconfig,$sql);
while($row=mysqli_fetch_array($result,MYSQLI_ASSOC)) {
$time = $row["TimeBought"];
}
$Time = date("Y-m-d H:i:s",$time);
$DateTime = time();
$NewTime = strtotime($Time);
What should I do from here?