Welcome Guest, Not a member yet? Register   Sign In
[Solved] Delete row if key code is there for more than 15 min
#4

(02-05-2017, 03:29 AM)Diederik Wrote: Just perform a single sql
Code:
DELETE FROM post
WHERE date_modifieda < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 15 MINUTE))

I tried this but does not work


PHP Code:
public function clear_unconfirmed_post() {
     $this->db->where('code is NOT NULL'NULLFALSE);
     $this->db->where('date_modified < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 15 MINUTE))');
     $this->db->delete($this->db->dbprefix 'post');

There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
RE: Delete row if key code is there for more than 15 min - by wolfgang1983 - 02-05-2017, 10:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB