所以我想在我的數據庫中插入一個新的用戶,但是當我要發佈我的註冊,這個錯誤彈出:致命錯誤:未捕獲的異常「異常」有消息「1048
Fatal error: Uncaught exception 'Exception' with message '1048' in
C:\xampp\htdocs\Zephryte\app\classes\users.class.php:110 Stack trace: #0
C:\xampp\htdocs\Zephryte\index.php(5): users->register() #1 {main} thrown in
C:\xampp\htdocs\Zephryte\app\classes\users.class.php on line 110
我做知道這來自於我的MySQLi連接,但我不知道這意味着什麼或做什麼用的吧...
這是產生錯誤代碼:
$query->bind_param('ssssssssssssssssssssss', $data, $_POST['username'], $_POST['password'], $een, $_POST['email'], $code, $ipAddress, $ipAddress, $data, $data, $een, $null, $null, $nul, $nul, $een, $een, $nul, $_POST['skype'], $nul, $nul, $null); //106
$query->execute(); //107
if (!$query->execute()) //108
{ //109
throw new Exception($this->db->conn->errno, 1); //110
} //111
$query->close(); //112
是否任何人你們知道錯誤是什麼,並且h解決它呢?
謝謝。
什麼是'$ nul','$ null','$ een',以及其中的其他變量?這些*全部*設置正確嗎? – 2014-10-30 20:31:34
http://stackoverflow.com/questions/22444873/php-mysql-execute-failed-1048-column-title-cannot-be-null-error http://stackoverflow.com/questions/25154105/error-1048- 23000-column-can-be-null-however-i-am-inserting-valid-data – Cheery 2014-10-30 20:31:46
根據文檔:['1048:Column can not be null ...'](http://forums.mysql.com/ read.php?98,576167,576167)。其中一列顯示爲「NULL」。 – War10ck 2014-10-30 20:32:26