Welcome Guest, Not a member yet? Register   Sign In
how to clear a field in database in x mins?
#5

(This post was last modified: 07-13-2018, 11:06 AM by richb201.)

Thanks Brian.  I have figured out that "my" code writes a time stamp into the database when it creates the "specialcode". So I when I check for the specialcode in the database, I  only want to consider records that have been created in the last 60 minutes. I wrote this

           $query = $this->db->get_where('users', array('forgot_pass_identity' => $fp_code),TIMESTAMPDIFF(MINUTE, NOW(), 'modified')=> '<60');//this is the user since the code matches using qb

The field in the database is called modified. I am not sure what the TIMESTAMPDIFF returns? The => is not working. I want to find records where the minutes is "less than 60".  Not sure if this is possible?
proof that an old dog can learn new tricks
Reply


Messages In This Thread
RE: how to clear a field in database in x mins? - by richb201 - 07-13-2018, 11:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB