0
$sql = "INSERT INTO `waitinglist` (`reserver`, `roomNumber`, `hotelNumber`, `queueDepth`)
VALUES(".$this->db->escape($reserver).", ".$room.", ".$i.", ".$queueDepth+1.")";
$this->db->query($sql);
我做了什麼錯?
_You意味着APPART from_你的腳本是[SQL注入攻擊]的風險(http://stackoverflow.com/questions/60174/how-can-i-prevent-sql -injection-in-php) 看看發生了什麼事[Little Bobby Tables](http://bobby-tables.com/)即使 [if你是逃避投入,它不安全!](http://stackoverflow.com/questions/5741187/sql-injection-that-gets-around-mysql-real-escape-string) 使用[編寫的參數化語句](http ://php.net/manual/en/mysqli.quickstart.prepared-statements.php) – RiggsFolly
是所有4列數字,還是其中的一些文本列 – RiggsFolly