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