function podlove_refresh_user_agents($start_id) { $agents = UserAgent::find_all_by_where(sprintf("id >= %d ORDER BY id ASC LIMIT 500", $start_id)); foreach ($agents as $ua) { $ua->parse()->save(); } }