public function moveTableOrder($fromTableId, $toTableId) { // siparişin table_id'sini değiştireceğiz if ($orderId = $this->isTableHaveOrder($fromTableId)) { $moveQ = $this->con->prepare("UPDATE orders SET table_id = :toTableId WHERE id = :orderId"); //$moveQ->execute(array("toTableId" => $toTableId, "orderId" => $orderId)); $moveQ->execute(compact("toTableId", "orderId")); // $fromTable pasif edilecek $tblCont = new Table(); $tblCont->deactive($fromTableId); // $toTable Aktif edilecek $tblCont->active($toTableId); } }