My code is like this :
function insert_delete()
{
...
$hotel = $hotel;
$address = $address;
$created_date = date('Y/m/d H:i:s');
$data = array('hotel' => $hotel,
'address' => $address,
'created_date' => $created_date
);
$this->db->insert('tb_hotel',$data);
$query = "DELETE FROM tbl_hotel WHERE created_date='$created_date'";
$this->db>query($query);
}
When calling the insert_delete function, it will run the insert query and delete query.
How to do when insert the data, it is directly delete the data, but delete the data after half an hour?
Thank you