[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1235] try adodb-caching the query instead of smarty-c
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1235] try adodb-caching the query instead of smarty-caching the template |
Date: |
Wed, 06 May 2009 19:33:50 +0000 |
Revision: 1235
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1235
Author: clint
Date: 2009-05-06 19:33:50 +0000 (Wed, 06 May 2009)
Log Message:
-----------
try adodb-caching the query instead of smarty-caching the template
Modified Paths:
--------------
trunk/nixtape/admin/report/mbid-mismatch.php
Modified: trunk/nixtape/admin/report/mbid-mismatch.php
===================================================================
--- trunk/nixtape/admin/report/mbid-mismatch.php 2009-05-06 19:25:08 UTC
(rev 1234)
+++ trunk/nixtape/admin/report/mbid-mismatch.php 2009-05-06 19:33:50 UTC
(rev 1235)
@@ -24,24 +24,19 @@
require_once($install_path . '/templating.php');
require_once($install_path . '/data/sanitize.php');
-$smarty->caching = 2;
-$smarty->cache_lifetime = 43200;
+$adodb->SetFetchMode(ADODB_FETCH_ASSOC);
+$recordSet = &$adodb->CacheExecute(7200, 'SELECT t.id, t.artist, t.album,
t.name, t.mbid as tmbid, st.mbid as stmbid FROM Scrobble_Track st JOIN Track t
ON lower(t.name)=st.name AND lower(t.album)=st.album AND
lower(t.artist)=st.artist AND t.mbid<>st.mbid');
-if(!$smarty->is_cached('mbid-mismatch-report.tpl')) {
- $adodb->SetFetchMode(ADODB_FETCH_ASSOC);
- $recordSet = &$adodb->Execute('SELECT t.id, t.artist, t.album, t.name,
t.mbid as tmbid, st.mbid as stmbid FROM Scrobble_Track st JOIN Track t ON
lower(t.name)=st.name AND lower(t.album)=st.album AND lower(t.artist)=st.artist
AND t.mbid<>st.mbid');
+$aEntries = array();
+$i = 0;
- $aEntries = array();
- $i = 0;
-
- while (!$recordSet->EOF) {
- $trow = sanitize($recordSet->fields);
- $aEntries[$i++] = $trow;
- $recordSet->MoveNext();
- }
-
- $smarty->assign("entries", $aEntries);
+while (!$recordSet->EOF) {
+ $trow = sanitize($recordSet->fields);
+ $aEntries[$i++] = $trow;
+ $recordSet->MoveNext();
}
+$smarty->assign("entries", $aEntries);
+
$smarty->display("mbid-mismatch-report.tpl");
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1235] try adodb-caching the query instead of smarty-caching the template,
Clint Adams <=