We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit bf7fc266 authored by clint's avatar clint

try out adodb for the mbid-mismatch report

parent 50994684
......@@ -20,7 +20,7 @@
*/
require("../../config.php");
require_once($install_path . '/database.php');
require_once($install_path . '/database2.php');
require_once($install_path . '/templating.php');
require_once($install_path . '/data/sanitize.php');
......@@ -28,15 +28,18 @@ $smarty->caching = 2;
$smarty->cache_lifetime = 43200;
if(!$smarty->is_cached('mbid-mismatch-report.tpl')) {
$res = $mdb2->query("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");
$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;
while (($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC))) {
$trow = sanitize($row);
while (!$recordSet->EOF) {
$trow = sanitize($recordSet);
$aEntries[$i++] = $trow;
$recordSet->MoveNext();
}
$smarty->assign("entries", $aEntries);
}
......
<?php
/* Libre.fm -- a free network service for sharing your music listening habits
Copyright (C) 2009 Free Software Foundation, Inc
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
if(!file_exists(dirname(__FILE__) . "/config.php")) {
die("Please run the <a href='install.php'>Install</a> script to configure your installation");
}
require_once('config.php');
require_once('adodb-exceptions.inc.php');
require_once('adodb.inc.php');
try {
$adodb =& NewADOConnection($adodb_connect_string);
} catch (exception $e) {
var_dump($e);
adodb_backtrace($e->gettrace());
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment