Commit 142ad8d2 by Jansa Jose

crone job

parent 90058168
......@@ -421,4 +421,4 @@ class Webservice extends CI_Controller {
}
?>
\ No newline at end of file
?>
<?php
$conn = mysqli_connect("192.168.140.123","root","Golden_123","tobin_eventTimeOut");
if($conn->connect_error){
return;
}
$todate = date('Y-m-d');
$sql = "UPDATE booking
INNER JOIN event_date_time ON event_date_time.id = booking.event_date_id
SET booking.status = '2'
WHERE event_date_time.date < '$todate' and event_date_time.time < now() and booking.status='1'";
$result = mysqli_query($conn, $sql);
$date_time = date('Y-m-d H:i:sa',strtotime('- 15 minutes'));
$sql = "UPDATE booking
INNER JOIN transaction ON transaction.booking_id = booking.bookId
SET booking.status = '5',transaction.status='3'
WHERE transaction.datetime > '$date_time'";
$conn->close();
?>
......@@ -160,4 +160,4 @@ class Validation_app_model extends CI_Model {
return array('state'=>$state,'response'=>$error_key);
}
}
?>
\ No newline at end of file
?>
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment