$results = $dbConnection->arrayQuery('SELECT resourceid, stamp, metadata, serialized, cachetype, UNCOMPRESS(content) AS content FROM cache WHERE content IS NOT NULL LIMIT 100'); break; # mysql # mysql case 'pgsql': case 'pdo_pgsql': $results = $dbConnection->arrayQuery("SELECT resourceid, stamp, metadata, serialized, cachetype, content FROM cache WHERE content IS NOT NULL LIMIT 100"); foreach ($results as &$v) { $v['content'] = stream_get_contents($v['content']); } # foreach break; # case Postgresql # case Postgresql case 'pdo_sqlite': $results = $dbConnection > arrayQuery('SELECT resourceid, stamp, metadata, serialized, cachetype, content FROM cache WHERE content IS NOT NULL LIMIT 100'); break; # mysql } foreach ($results as $cacheItem) { if ($cacheItem['metadata']) { $cacheItem['metadata'] = unserialize($cacheItem['metadata']); } # if echo '.'; $cacheDao->putCacheContent($cacheItem['resourceid'], $cacheItem['cachetype'], $cacheItem['content'], $cacheItem['metadata'], 0); /* * Actually invalidate the cache content */ $dbConnection->modify("UPDATE cache SET content = NULL where resourceid = :resourceid AND cachetype = :cachetype", array(':resourceid' => array($cacheItem['resourceid'], PDO::PARAM_STR), ':cachetype' => array($cacheItem['cachetype'], PDO::PARAM_INT))); }
function kota() { global $s, $id, $inp, $par, $arrParameter; $data = arrayQuery("select concat(kodeData, '\t', namaData) from mst_data where statusData='t' and kodeInduk='{$par['kodePropinsi']}' and kodeCategory='" . $arrParameter[16] . "' order by namaData"); return implode("\n", $data); }