Проблема с моими кодами ООП
Parse error: syntax error, unexpected 'else' (T_ELSE) in C:\xampp\htdocs\OOP\blog\libs\database.php on line 33
Что я уже пробовал:
<pre><?php class database{ public $host = DB_HOST; public $user = DB_USER; public $pass = DB_PASS; public $db_name = DB_NAME; public $link; public function __construct(){ $this->connect(); } private function connect(){ $this ->link=new mysql ($this->host,$this->user,$this->pass,$this->db_name); } public function select($query){ $result = $this->link ->query($query); if($result->num_rows> 0){ } return $result; else{ return false; } } public function insert($query){ $insert = $this->link->query($query); if($insert){ header('location:index.php?insert= Post inserted ...'); } else{ echo"Post did not insert ..."; } } public function update($query){ $update = $this->link->query($query); if($update){ header('location:index.php?Update= Post updated ...'); } else{ echo"Post did not update ..."; } } public function delete($delete){ $delete = $this->link->query($query); if($delete){ header('location:index.php?delete= Post deleted ...'); } else{ echo"Post did not delete ..."; } } } ?>