librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1158] debugging codes


From: Clint Adams
Subject: [Librefm-commits] [1158] debugging codes
Date: Sun, 03 May 2009 20:14:59 +0000

Revision: 1158
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1158
Author:   clint
Date:     2009-05-03 20:14:58 +0000 (Sun, 03 May 2009)
Log Message:
-----------
debugging codes

Modified Paths:
--------------
    trunk/gnukebox/scrobble-utils.php

Modified: trunk/gnukebox/scrobble-utils.php
===================================================================
--- trunk/gnukebox/scrobble-utils.php   2009-05-03 20:13:19 UTC (rev 1157)
+++ trunk/gnukebox/scrobble-utils.php   2009-05-03 20:14:58 UTC (rev 1158)
@@ -34,7 +34,7 @@
        $res = $mdb2->query("SELECT username FROM Scrobble_Sessions WHERE 
sessionid = " . $mdb2->quote($session_id, "text")); // get the username from 
the table
 
        if(PEAR::isError($res)) {   
-               die("FAILED " . $res->getMessage() . "\n");
+               die("FAILED ufs " . $res->getMessage() . "\n");
                // die is there is an error, printing the error
        }
 
@@ -56,14 +56,14 @@
 
        $res = $mdb2->query("SELECT name FROM Artist WHERE name = " . 
($artist));
        if(PEAR::isError($res)) {
-               die("FAILED " . $res->getMessage() . "\n");
+               die("FAILED art " . $res->getMessage() . "\n");
        }
 
        if(!$res->numRows()) {
                // Artist doesn't exist, so we create them
                $res = $mdb2->query("INSERT INTO Artist (name) VALUES (" . 
($artist) . ")");
                if(PEAR::isError($res)) {
-                       die("FAILED " . $res->getMessage() . "\n");
+                       die("FAILED artc " . $res->getMessage() . "\n");
                }
        }
 }
@@ -73,7 +73,7 @@
 
        $res = $mdb2->query("SELECT name FROM Album WHERE name = " . ($album) . 
" AND artist_name = " . ($artist));
        if(PEAR::isError($res)) {
-               die("FAILED " . $res->getMessage() . "\n");
+               die("FAILED alb " . $res->getMessage() . "\n");
        }
 
        if(!$res->numRows()) {
@@ -92,7 +92,7 @@
          }
 
                if(PEAR::isError($res)) {
-                       die("FAILED " . $res->getMessage() . "\n");
+                       die("FAILED albc " . $res->getMessage() . "\n");
                }
        }
 }
@@ -109,7 +109,7 @@
        $res = $mdb2->query("SELECT id FROM Track WHERE lower(name) = lower(" . 
($track) . ") AND lower(artist) = lower(" . ($artist) . ") AND album IS NULL");
        }
        if(PEAR::isError($res)) {
-               die("FAILED " . $res->getMessage() . "\n");
+               die("FAILED trk " . $res->getMessage() . "\n");
        }
 
        if(!$res->numRows()) {
@@ -120,7 +120,7 @@
                        . ($album) . ", "
                        . ($mbid) . ")");
                if(PEAR::isError($res)) {
-                       die("FAILED " . $res->getMessage() . "\n");
+                       die("FAILED trkc " . $res->getMessage() . "\n");
                }
                return getTrackCreateIfNew($artist, $album, $track, $mbid);
        } else {
@@ -136,7 +136,7 @@
                . (($album == 'NULL') ? "IS NULL" : ("= lower(" . ($album) . 
")")) . " AND mbid "
                . (($mbid == 'NULL') ? "IS NULL" : ("= lower(" . ($mbid) . 
")")));
        if(PEAR::isError($res)) {
-               die("FAILED " . $res->getMessage() . "\n");
+               die("FAILED st " . $res->getMessage() . "\n");
        }
 
        if(!$res->numRows()) {
@@ -148,7 +148,7 @@
                        . "lower(" . ($mbid) . "),"
                        . ($tid) . ")");
                if(PEAR::isError($res)) {
-                       die("FAILED " . $res->getMessage() . "\n");
+                       die("FAILED stc " . $res->getMessage() . "\n");
                }
                return getScrobbleTrackCreateIfNew($artist, $album, $track, 
$mbid, $tid);
        } else {
@@ -161,7 +161,7 @@
 
        $res = $mdb2->query("SELECT time FROM Scrobbles WHERE username = " . 
($username) . " AND artist = " . ($artist) . " AND track = " . ($track) . " AND 
time = " . ($time));
        if(PEAR::isError($res)) {
-               die("FAILED " . $res->getMessage() . "\n");
+               die("FAILED se " . $res->getMessage() . "\n");
        }
 
        if(!$res->numRows()) {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]