[eluser]RobertSF[/eluser]
No, deleting rows one at a time from an SQL database is much more inefficient than deleting them all at once. What you have there seems fine, except that wouldn't your query as you have it delete all entries with dates
before yesterday?
Frankly, SQL itself is hard enough that I prefer to work out the SQL, and then just do a
$this->db->query('whatever I'm doing in SQL'). As far as I can tell, the CI database method query will execute any SQL statement.