smallint(1) T/F boolean mojo $sql = "SELECT song.id FROM song WHERE song.status='enabled' AND"; // Get the catalogs and build the query! while ($r = mysql_fetch_object($db_results)) { if (preg_match("/catalog/",$sql)) { $sql .= " OR song.catalog='$r->id'"; } else { $sql .= " song.catalog='$r->id'"; } } // build query $db_results = mysql_query($sql, dbh()); // Recurse through the songs and build a results // array that is base64_encoded while ($r = mysql_fetch_object($db_results)) { $song = new Song($r->id); $song->album = $song->get_album_name(); $song->artist = $song->get_artist_name(); $song->genre = $song->get_genre_name(); // Format the output $output = ''; $output = $song->artist . "::" . $song->album . "::" . $song->title . "::" . $song->comment . "::" . $song->year . "::" . $song->bitrate . "::" . $song->rate . "::" . $song->mode . "::" . $song->size . "::" . $song->time . "::" . $song->track . "::" . $song->genre . "::" . $r->id; $output = base64_encode($output); $results[] = $output; // Prevent Timeout set_time_limit(0); } // while songs set_time_limit(0); $encoded_array = old_xmlrpc_encode($results); return new xmlrpcresp($encoded_array); } // remote_song_query /*! @function remote_server_denied @discussion Access Denied Sucka! */ function remote_server_denied() { $result = array(); $result['access_denied'] = "Access Denied: Sorry, but " . $_SERVER['REMOTE_ADDR'] . " does not have access to " . "this server's catalog. Please make sure that you have been added to this server's access list.\n"; $encoded_array = old_xmlrpc_encode($result); return new xmlrpcresp($encoded_array); } // remote_server_deniee ?>