何らかの理由で、テーブルからデータを選択することしかできませんが、挿入することはできません。
つまり、関数は正常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();