2014-03-31 30 views
0

你好,請給我支持,在此:不推薦使用:mysql_connect()函數的mysqli現在

eprecated:mysql_connect()函數:mysql擴展已被棄用,並會在將來被移除:使用庫MySQLi或PDO而不是...

$this->conn = mysql_connect ($this->host, $this->user, $this->pass) or die ('ERR_DB_CONNECT'); 

    $result = mysql_query ($query, $this->conn) or die (mysql_error()); 

什麼是新版本?

+0

http://ca2.php.net/mysqli_connect – ApplePie

+0

[爲什麼我不應該在PHP中使用mysql_ *函數?](http://stackoverflow.com/questions/12859942/why-shouldnt-i-use- mysql-functions-in-php) – Phil

+0

對於新版本的PHP,棄用了'mysql_ *'函數。它會拋出這樣的錯誤。所以使用'mysqli_ *'或'PDO'功能 –

回答

相關問題