<?php
    public function add_albums($band_id,$albums)
	{
			for ($i=0 ; $i<count($albums); $i++)
			{
					$album_id=$albums[$i];
					$string="INSERT INTO `bands_albums` (`band_id`,`album_id`) VALUES (:band_id,:album_id)";
					$query=$this->db->prepare($string);
					$query->bindValue(':band_id', $band_id, PDO::PARAM_INT);
					$query->bindValue(':album_id', $album_id, PDO::PARAM_INT);
					if(!$query->execute())
						return false;
			}
			return true;

	}
?>