這裏是我試圖執行代碼:如何解決未知的列數據庫錯誤?
function update()
{
$this->name = $_POST['txtname'];
$this->address = $_POST['txtaddr'];
$sql1 = "update reg set adress='$this->address' where name='$this->name'";
$Q1 = $this->db->query($sql1);
echo "Updated Successfully";
}
這是運行時,我收到錯誤:
A Database Error Occurred
Error Number: 1054
Unknown column 'adress' in 'field list'
update reg set adress='mumbai' where name='sagar'
Filename: C:\wamp\www\sagar\system\database\DB_driver.php
Line Number: 330
我可以採取什麼步驟來調試這樣的事情?