Mam błąd którego istnienia za bardzo nie rozumiem. Oto kod:
public function remove($table = NULL, $parameters = NULL){ $this->setTable($table); if($parameters === NULL){ $this->displayError('You must specific parameters to use this method'); } $whereString = null; foreach ($parameters as $field => $value){ $whereString = " WHERE ".$field." = '".$value."'"; } else { $whereString.= " AND ".$field." = '".$value."'"; } } $this->_query = $this->_connection->prepare("DELETE FROM "$this->_table.$whereString); } else { $this->_query = $this->_connection->prepare("DELETE FROM "$this->_table.$paraqmeters); } return $this->_query; }
Php wywala mi "Unexpected $this ..." przy "$this->_query = $this->_connection->prepare". Wiecie może czemu?