[eluser]pickupman[/eluser]
Codeigniter is object oriented so you when you want to call another function/method inside a controller/model/library you would use:
Code:
//Controller or Model or Library
function a(){
//Do something here
}
function b(){
//Get value from function a
$this->a();
}
So you basically write $this->functionName() to reference a function/method in the same class/file. If you want to reference a function in another class's function/method, then you would use $this->anotherClass->functionName() (using CI's syntax). In regular PHP you would just use anotherClass->functionName().
A second part of your question/dilemma could also be fixed using a JOIN statement. You can join the two table based on a matching CatID.
Code:
$this->db->select("PageDetails.*, CatsList.*");
$this->db->from("PageDetails");
$this->db->join("CatsList","PageDetails.CatID=CatsList.CatID");
$query = $this->db->get();