prepare_simplepie_object_for_cache example

$query->bindValue(':purge_time', $this->options['extras']['cache_purge_time']);

        if (!$query->execute())
        {
            return false;
        }

        if ($data instanceof SimplePie)
        {
            $data = clone $data;

            $prepared = self::prepare_simplepie_object_for_cache($data);

            $query = $this->mysql->prepare('SELECT COUNT(*) FROM `' . $this->options['extras']['prefix'] . 'cache_data` WHERE `id` = :feed');
            $query->bindValue(':feed', $this->id);
            if ($query->execute())
            {
                if ($query->fetchColumn() > 0)
                {
                    $items = count($prepared[1]);
                    if ($items)
                    {
                        $sql = 'UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `items` = :items, `data` = :data, `mtime` = :time WHERE `id` = :feed';
                        
Home | Imprint | This part of the site doesn't use cookies.