public static function getInstance() { if (self::$instance == null) { self::$instance = new self(); } return self::$instance; }
public function getGaleryText($galery_id) { $query = "SELECT galery_text FROM name WHERE id_galery=" . $galery_id; $result = BD_Connector::getInstance()->query($query); if ($result->num_rows > 0) { $result = mysqli_fetch_array($result); return $result[0]; } else { $str = ""; return $str; } }
public function __destruct() { BD_Connector::getInstance()->close(); }
public function setFileInBase($id_galery, $file_path) { $query = "INSERT INTO files(id_galery,path_files) VALUES({$id_galery},'{$file_path}')"; BD_Connector::getInstance()->query($query); }