if(!$user_info['is_guest'])
{
$dbresult = db_query("
SELECT
t.ID_MEMBER, t.ID_ITEM, i.ID_ITEM, i.ID_GROUPToMove
FROM {$db_prefix}store_transactions AS t, {$db_prefix}store_item AS i
WHERE
t.ID_MEMBER = $ID_MEMBER AND t.ID_ITEM = i.ID_ITEM AND i.ID_GROUPToMove != 0", __FILE__, __LINE__);
$found = db_affected_rows();
mysql_free_result($dbresult);
// If the record exists
if ($found == true)
{
$dbresult = db_query("
SELECT
ID_MEMBER
FROM {$db_prefix}store_group_log
WHERE ID_MEMBER = $ID_MEMBER", __FILE__, __LINE__);
$found = db_affected_rows();
mysql_free_result($dbresult);
// If no record exists
if ($found == false)
$context['membership_existed'] = 1;
}
}
My question is, how do I use the forum's caching system to cache this. It is per user based and doesn't get updated often. Also, is it important to cache?