Klasa kontrolera (wrzucam konkretny fragment kodu)
$link = new MySQLConnect('localhost', 'root', ''); $this->_connection = $link->getConnection(); $this->_dbConnection = new MySQLQuery('mvc', $this->_connection); require_once('model/UserModel.class.php'); $this->_userModel = new UserModel('pinokio', $this->_dbConnection); $this->_userModel->registerUser('pinokio', 'pinokio@pinokio.com');
a błąd wygląda tak:
Cytat
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'www-data'@'localhost' (using password: NO) in
...
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in ...
(powtarza się to kilka razy)
Warning: mysql_query(): 13 is not a valid MySQL-Link resource in...
...
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in ...
(powtarza się to kilka razy)
Warning: mysql_query(): 13 is not a valid MySQL-Link resource in...
W każdym razie nie wiem w czym leży problem bo kiedy korzystajac z tych samych klas MySQLConnect oraz MySQLQuery tylko poprzez plik testowy ktorego zawartosc wyglada tak:
$link = new MySQLConnect('localhost', 'root', ''); $login = 'admin'; $password = 'pinokio'; $email = 'admin@localhost'; 'email' => $email'); $link2 = $link->getConnection(); $connection = new MySQLQuery('mvc', $link2); $result = $connection->dbInsert('users', $datas);
nie występuje żaden problem :|
Prosze o pomoc, z góry dziekuje !
