Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public function friend($name)
  2. {
  3. $arr = explode(" ",$name);
  4. $fname = $arr[0];
  5. $lname = $arr[1];
  6.  
  7. $this->db->select('*');
  8. $this->db->from('client');
  9. $where = "fname='".$fname."' and lname='".$lname."'";
  10. $this->db->where($where);
  11. $sql = $this->db->get();
  12. if($sql->num_rows() > 0)
  13. {
  14. $result = $sql->result_array();
  15. return $result;
  16. }
  17. else
  18. {
  19. $this->session->set_userdata('err','<p style="color:red;">No information found!</p>');
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement