format("Y-m-d H:i:s"); $sql = "UPDATE schedules SET rantime = ?, status = 'runnning' WHERE id = ?"; if($stmt = mysqli_prepare($link, $sql)){ mysqli_stmt_bind_param($stmt, "si", $datenow, $schedid); if(mysqli_stmt_execute($stmt)){ echo "$shell:$script"; exit(); } else{ echo 0; } } } }