/** * save images belonging to a certain event to the database * * @param $event_id - numeric ID of the event to store for * @param $images - array of image URLs to store * @param $conn - a PDO connection object * * @returns ( "status" => self::OK ) on success * or ( "status" => self::ERROR, "error" => "an error message" ) on failure */ static function save_irc_channels_for_event($event_id, $channels, $conn = null) { $conn = $conn ?: Persistence::get_database_object(); $table_name = 'irc'; $assoc_column = 'channel'; if (is_null($conn)) { return array("status" => self::ERROR, "error" => "Couldn't get connection object."); } return Persistence::store_array($table_name, $assoc_column, $channels, $event_id, $conn); }