[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1112] these are being set to the string 'NULL'
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1112] these are being set to the string 'NULL' |
Date: |
Sat, 02 May 2009 04:25:23 +0000 |
Revision: 1112
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1112
Author: clint
Date: 2009-05-02 04:25:23 +0000 (Sat, 02 May 2009)
Log Message:
-----------
these are being set to the string 'NULL'
Modified Paths:
--------------
trunk/gnukebox/scrobble-utils.php
Modified: trunk/gnukebox/scrobble-utils.php
===================================================================
--- trunk/gnukebox/scrobble-utils.php 2009-05-02 04:17:30 UTC (rev 1111)
+++ trunk/gnukebox/scrobble-utils.php 2009-05-02 04:25:23 UTC (rev 1112)
@@ -131,10 +131,7 @@
function getScrobbleTrackCreateIfNew($artist, $album, $track, $mbid, $tid) {
global $mdb2;
- if($album) { $album = strtolower($album); }
- if($mbid) { $mbid = strtolower($mbid); }
-
- $res = $mdb2->query("SELECT id FROM Scrobble_Track WHERE name = " .
(strtolower($track)) . " AND artist = " . (strtolower($artist)) . " AND album =
" . ($album) . " AND mbid = " . ($mbid));
+ $res = $mdb2->query("SELECT id FROM Scrobble_Track WHERE name = " .
(strtolower($track)) . " AND artist = " . (strtolower($artist)) . " AND album "
. ($album == 'NULL') ? "IS NULL" : ("= " . (strtolower($album))) . " AND mbid "
. ($mbid == 'NULL') ? "IS NULL" : ("= " . (strtolower($mbid))));
if(PEAR::isError($res)) {
die("FAILED " . $res->getMessage() . "\n");
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1112] these are being set to the string 'NULL',
Clint Adams <=