Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- class UserModel extends CI_Model{
- public function getFamilyProfile($email){
- $this->db->where('email',$email);
- $names = $this->db->get('user')->result();
- if($names){
- foreach($names as $name){
- $data = array(
- 'id_user' => (int)$name->id_user,
- 'name' => $name->name,
- 'email' => $name->email,
- 'telephone' => $name->telephone,
- 'age' => (int)$name->age,
- );
- }
- $response['message'] = 'Get Data Success';
- $response['error'] = false;
- $response['user'] = $data;
- }else{
- $response['message'] = 'User Not Found';
- $response['error'] = true;
- }
- return $response;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement