This is my first post here.I am an android developer and my server stuff is always in php.
I am using the PHP + codeigniter + MySQL based architechture to perform some basic database operation like insert,read,update.
To test out the scripts functioning I am firing the script url with proper parameters in my browser , but the issue is the insert function is not working
device_model.php
Code: Select all
function insertid($id=false,$name=false,$number=false)
{
$res = $this->db->get_where('tbl_device', array('clm_device_id'=>$id,'clm_device_name'=>$name,'clm_device_number'=>$number))->num_rows;
if($res==0){
$date = date("Y-m-d");
$this->db->insert('tbl_device', array('clm_registered'=>$date, 'clm_device_id'=>$id,'clm_device_name'=>$name,'clm_device_number'=>$number));
}
return;
}Code: Select all
function checkdevice($did=false)
{
if($_POST){
$did = $_REQUEST['did'];
$name = $_REQUEST['name'];
$number = $_REQUEST['number'];
$res = $this->device_model->insertid($did, $name, $number);
return;
}
}www.[xxxxxx].com/[xxxx]/device/checkdevice/test/test/test