出于某种原因,我只能从表中选择数据,但不能插入。
即功能nee()
工作正常,但wee()
没有......它今天早些时候工作......有人知道原因吗?
Class wtf{
private $db;
public function __construct(){
$this->db = new Store_Connection();
$this->db = $this->db->dbStore();
}
public function nee(){
$st = $this->db->prepare("select paid from sales where id=14");
$st->execute();
$product = $st->fetch(PDO::FETCH_OBJ);
print_r($product);
}
public function wee(){
$st = $this->db->prepare("insert into sales(paid) values (sdf)");
$st->execute();
}
}
$work = new wtf();
$work->wee();