Example from the Trackers extension:
Code:
$trackers = $this->cache->get('_trackers');if (!$trackers){$sql = 'SELECT *FROM ' . $this->table_prefix . 'trackers_trackers';$result = $this->db->sql_query($sql);$trackers = [];while ($row = $this->db->sql_fetchrow($result)){$trackers[$row['tracker_id']] = $row;}$this->db->sql_freeresult($result);$this->cache->put('_trackers', $trackers);}
Statistics: Posted by Kailey — Thu Jan 09, 2025 2:00 am