Welcome Guest, Not a member yet? Register   Sign In
Delete Query from codeigniter

I'm trying to figure out how I need to do this query. I'm trying to delete all the users who have registered but not activated witin a certain time limit.

function purgeNA($expirePeriod)
    $this->db->where('usersStatusesID', 1);
    $this->db->where('UNIX_TIMESTAMP(registrationDate) <', time() - $expirePeriod);

Here's my db structure:

usersRegistrationsTable - userID, registrationDate
usersTable              - userID, usersStatusesID

Theme © iAndrew 2016 - Forum software by © MyBB