/** * Deletes all players marked with the 'deleted' flag * * @param dblogin * the DB link */ function inactives_delete($db_login) { // prepare query $query = 'SELECT user, LoginID, email, countResend, creation, deleted ' . 'FROM Login WHERE activated = 1 AND deleted = 1'; // send query $r = $db_login->query($query); // error! if (!$r) { inactives_log('Could not retrieve users'); exit(1); } // iterate through all the records while ($row = $r->nextRow()) { inactives_log('player to be deleted: %d, %s, %s, %d resends, %s', $row['LoginID'], $row['user'], $row['email'], $row['countResend'], $row['creation']); inactives_callDeleteScript($row['LoginID']); } }
/** * Deletes all players marked with the 'deleted' flag * * @param dblogin * the DB link */ function inactives_delete($db_login) { // prepare query $sql = $db_login->prepare("SELECT user, LoginID, email, countResend, creation, deleted \n FROM Login WHERE activated = 1 AND deleted = 1"); // error! if (!$sql->execute()) { inactives_log('Could not retrieve users'); exit(1); } // iterate through all the records while ($row = $sql->fetch()) { inactives_log('player to be deleted: %d, %s, %s, %d resends, %s', $row['LoginID'], $row['user'], $row['email'], $row['countResend'], $row['creation']); inactives_callDeleteScript($row['LoginID']); } }