Welcome Guest, Not a member yet? Register   Sign In
model won't work
#1

[eluser]aeternuslibertas[/eluser]
I been trying to get this model to work for a couple hours now... anytime i call any of the methods i get nothing, but if I delete all but one then I do get a result, is there a limit to the number of methods one can have in a model?
Code:
<?php

     class Business_profile_model extends CI_Model{
    
  public function __construct()
{
  parent::__construct();
}      
      
/*=========================*/
//     index()
/*=========================*/    
public function index(){
echo('nothing');}

/*=========================*/
//     get_profile()
/*=========================*/
public function get_profile($id)
{
   $profile = $this->db->limit(1)->get_where('business_profile',array('business_id'=>$id));
  
   return $profile->row();
  
}

/*=========================*/
//    get_business_name()
/*=========================*/
public function get_business_name($id)
{
  $profile = $this->get_profile($id);
  return $profile->business_name;
}

/*=========================*/
//     get_custom_uri()
/*=========================*/
public function get_custom_uri($id)
{
  $profile = $this->get_profile($id);
  return $profile->custom_uri;
}

/*=========================*/
//      get_custom_domain()
/*=========================*/
public function  get_custom_domain($id)
{
  $profile = $this->get_profile($id);
  return $profile->custom_domain;
}

/*=========================*/
//      get_address_numbers()
/*=========================*/
public function  get_address_numbers($id)
{
  $profile = $this->get_profile($id);
  return $profile->address_numbers;
}

/*=========================*/
//    get_address_city()  
/*=========================*/
public function  get_address_city($id)
{
  $profile = $this->get_profile($id);
  return $profile->address_city;
}

/*=========================*/
//   get_address_state()
/*=========================*/
public function  get_address_state($id)
{
  $profile = $this->get_profile($id);
  return $profile->address_state;
}
/*=========================*/
//   get_address_zip_code()  
/*=========================*/
public function  get_address_zip_code($id)
{
  $profile = $this->get_profile($id);
  return $profile->address_zipcode;
}
/*=========================*/
//   get_neighborhood_name()  
/*=========================*/
public function  get_neighborhood_name($id){

  $profile = $this->get_profile($id);
  return $profile->neighborhood_name;
}
/*=========================*/
//   get_phone_number()  
/*=========================*/
public function  get_phone_number($id)
{
  $profile = $this->get_profile($id);
  return $profile->phone_number;
}
/*=========================*/
//   get_fax_number()  
/*=========================*/
public function  get_fax_number($id)
{
  $profile = $this->get_profile($id);
  return $profile->fax_number;
}
/*=========================*/
//   get_business_hours()  
/*=========================*/
public function  get_business_hours($id)
{
  $profile = $this->get_profile($id);
  return $profile->business_hours;
}
/*=========================*/
//   get_profile_pic()
/*=========================*/
public function  get_profile_pic($id)
{
  $profile = $this->get_profile($id);
  return $profile->business_profile_pic;
}
/*=========================*/
//   get_profile_pic_thumb($id)  
/*=========================*/
public function  get_profile_pic_thumb($id)
{
  $profile = $this->get_profile($id);
  return $profile->business_profile_pic_thumb;
}
/*=========================*/
//   get_business_tagline
/*=========================*/
public function  get_business_tagline($id)
{
  $profile = $this->get_profile($id);
  return $profile->business_tagline;
}
/*=========================*/
//      get_business_bio()
/*=========================*/
public function  get_business_bio($id)
{
  $profile = $this->get_profile($id);
  return $profile->business_bio;
}
/*=========================*/
//      get_facebook_url()
/*=========================*/
public function  get_facebook_url($id)
{
  $profile = $this->get_profile($id);
  return $profile->facebook_url;
}
/*=========================*/
//   get_twitter_url()  
/*=========================*/
public function  get_facebook_url($id)
{
  $profile = $this->get_profile($id);
  return $profile->twitter_url;
}
/*=========================*/
//     get_linkedin_url()
/*=========================*/
public function  get_linkedin_url($id)
{
  $profile = $this->get_profile($id);
  return $profile->linkedin_url;
}
/*=========================*/
//     get_website_url()
/*=========================*/
public function  get_website_url($id)
{
  $profile = $this->get_profile($id);
  return $profile->website_url;
}



}//end Login_model class
#2

[eluser]aeternuslibertas[/eluser]
never mind... I found the error... there are two public get_facebook_url()'s functions... mod please delete this post ty




Theme © iAndrew 2016 - Forum software by © MyBB