summaryrefslogtreecommitdiffstats
path: root/lib/general.lib.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-07-09 07:49:59 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-07-09 07:49:59 +0000
commitc5d6e04d114d3c4b3f31743ccd0d4a60c9ef9632 (patch)
treebc3196cb97d63079013ebfc5b183d2038ee7c9e7 /lib/general.lib.php
parentc9170314af9139abef87629d218c7999bd3c8df3 (diff)
downloadampache-c5d6e04d114d3c4b3f31743ccd0d4a60c9ef9632.tar.gz
ampache-c5d6e04d114d3c4b3f31743ccd0d4a60c9ef9632.tar.bz2
ampache-c5d6e04d114d3c4b3f31743ccd0d4a60c9ef9632.zip
removed ID field from user table, and everything that goes with that...
Diffstat (limited to 'lib/general.lib.php')
-rw-r--r--lib/general.lib.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php
index 38afb2e8..ee32d328 100644
--- a/lib/general.lib.php
+++ b/lib/general.lib.php
@@ -514,7 +514,7 @@ function get_random_songs( $options, $matchlist) {
$query = "SELECT song.id FROM song WHERE $artists_where ORDER BY RAND()";
}
elseif ($options['unplayed'] == 1) {
- $uid = $_SESSION['userdata']['id'];
+ $uid = $_SESSION['userdata']['username'];
$query = "SELECT song.id FROM song LEFT JOIN object_count ON song.id = object_count.object_id " .
"WHERE ($where) AND ((object_count.object_type='song' AND userid = '$uid') OR object_count.count IS NULL ) " .
"ORDER BY CASE WHEN object_count.count IS NULL THEN RAND() WHEN object_count.count > 4 THEN RAND()*RAND()*object_count.count " .