Код: Выделить всё
public function friend($name)
{
$arr = explode(" ",$name);
$fname = $arr[0];
$lname = $arr[1];
$this->db->select('*');
$this->db->from('client');
$where = "fname='".$fname."' and lname='".$lname."'";
$this->db->where($where);
$sql = $this->db->get();
if($sql->num_rows() > 0)
{
$result = $sql->result_array();
return $result;
}
else
{
$this->session->set_userdata('err','
No information found!
');
}
}
Спасибо
Мобильная версия