Memcache单预编写的Sql查询

时间:2013-12-09 23:27:20

标签: php mysql sql memcached

我使用的是开源软件,但我需要在更新之前将某个预编写的sql查询memcached 20分钟。

以下是需要进行memcached的MySQL查询的文件片段。

我如何更改此/我将为此查询添加的内容,以便在20分钟内进行memcached?

if (!empty($forum_ary)){

$sqls = 'SELECT a.attach_id, a.topic_id, a.post_msg_id, a.physical_filename, a.real_filename, f.forum_id, t.topic_id, t.forum_id, t.topic_title
        FROM ' . ATTACHMENTS_TABLE . ' a, ' . FORUMS_TABLE . ' f, ' . TOPICS_TABLE . ' t 
        WHERE (mimetype = "image/jpeg")
        AND f.forum_id = ' . $forum_id . '
        AND a.topic_id = t.topic_id
        AND ' . $db->sql_in_set('t.forum_id', $forum_ary) . '
        AND t.forum_id IN (' . $forums . ')
        ORDER BY post_msg_id DESC';     
$results = $db->sql_query_limit($sqls, $convert_real_size); // NEU Wichtig $convert_real_size

0 个答案:

没有答案