From e25a9d5480b6f12584a1297eb907906436f52da6 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 5 Jan 2006 15:43:44 +0000 Subject: I swear the last db upgrade of this release... at least it better be or I will have to beat myself up --- lib/class/playlist.class.php | 2 -- lib/class/update.class.php | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/class/playlist.class.php b/lib/class/playlist.class.php index 201b63e1..f0ef69ff 100644 --- a/lib/class/playlist.class.php +++ b/lib/class/playlist.class.php @@ -119,7 +119,6 @@ class Playlist { $results = array(); while ($r = mysql_fetch_assoc($db_results)) { - if ($r['dyn_song']) { $array = $this->get_dyn_songs($r['dyn_song']); $results = array_merge($array,$results); @@ -172,7 +171,6 @@ class Playlist { * Query has to return id which must be a song.id */ $db_results = mysql_query($dyn_string, dbh()); - $results = array(); while ($r = mysql_fetch_assoc($db_results)) { diff --git a/lib/class/update.class.php b/lib/class/update.class.php index e6dfbb84..597a37cf 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -259,6 +259,10 @@ class Update { $version[] = array('version' => '332006','description' => $update_string); + $update_string = '- Alters the Dynamic Song field to be TEXT instead of Varchar (varchar was not long enough).'; + + $version[] = array('version' => '332007','description' => $update_string); + return $version; } // populate_version @@ -1386,5 +1390,19 @@ class Update { } // update_332006 + /** + * update_332007 + * Arg... I'm tried of writting these updates + * If I would only get it right the first time I wouldn't have to do this + */ + function update_332007() { + + $sql = "ALTER TABLE `playlist_data` CHANGE `dyn_song` `dyn_song` TEXT NULL DEFAULT NULL"; + $db_results = mysql_query($sql, dbh()); + + $this->set_version('db_version','332007'); + + } // update_332007 + } // end update class ?> -- cgit