how to update row in tables using the following code ..
اقتباس
Myproject>>
Controller>>
article.php
Public function edit (){
$this->data=$this->model->getBYid($_request[“id”]);
$this->view=”new.php”;
}
Global >>
Controller.php
Protected function edit(){
If (empty($_REQUEST[“id”]))
Return ;
$this ->data=$this->model->getBYId($_request[“id”]);
$this->view=”new.php”;
Global>>
model.php
Public function getbyid($id){
If(empty ($id)) returns;
$this->sql=’SELECT *FROM .$this->tbl’’;
$this->sql.=” where ” .$this->pk.’=’.$id;
$data=$this->execute SQL();
Return $data[0];