codeigniter delete record by id
//include this in your controller
public function delete_record($eid){
$delete = $this->your_model->delete_record($id);
if ($delete == FALSE) {
$this->session->set_flashdata('error', 'Employee deletion failed, try again.');
redirect('your_view', 'refresh');
} else {
$this->session->set_flashdata('success', 'Employee deleted successfully.');
redirect('your_view', 'refresh');
}
}
//include this in your model
public function delete_record($id){
$deleted = $this->db->delete('mytable', array('id' => $id));
return $deleted;
}
Also in PHP:
- array_column in php
- $get url php
- factoring and seeding in laravel
- fetch today data in php
- display date time in php
- PHP text string contains character
- artisan clear cahce
- current date() in php
- centos 7 install php composer
- clear cache terminal laravel
- debug native php
- error messaging php
- can i back up mysql database from php code?
- < Php echo date("m") . " "; ?> what is the output of this script?
- $this- attribute laravel
- db seeder artisan
- PHP debug console print
- defaultstringlength(191)
- check if value contain letter php
- add checkbox in server side datatable laravel
- data time on php
- am and pm in php
- Error message: Allowed memory size of bytes exhausted wordpress
- base64 to string pp