lang . " AS title, " . " description_" . $this->lang . " AS description " . "FROM album " . "WHERE " . " id = '$id' OR " . " permalink = '$id';"; $q = mysqli_query($this->db, $s); if (mysqli_num_rows($q) > 0){ $r = mysqli_fetch_array($q); $this->id = $r["id"]; $this->permalink = $r["permalink"]; if (!is_null($r["title"])){ $this->title = $r["title"]; } if (!is_null($r["description"])){ $this->description = $r["description"]; } } $s_photo = "SELECT photo " . "FROM photo_album " . "WHERE " . " album = " . $this->id . ";"; $q_photo = mysqli_query($this->db, $s_photo); while($r_photo = mysqli_fetch_array($q_photo)){ array_push($this->photo, new Photo($this->db, $this->lang, $r_photo["photo"])); } } } ?>