[eluser]Unknown[/eluser]
[quote author="pickupman" date="1271754581"]
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();
[/quote]
The join statement is what I needed (sorry been a while since I did them in SQL). My next question would be how to get the results to show up under their respective category heading.
UPDATE
Looks like I was able to do it with a little tweaking of the output. Not 100% if this is the recommended way but it does work (from what I can see)
It was done in the view file:
Code:
$catTitle ="";
foreach ($invaders as $inva){
if ($catTitle == "$inva->CatName") {
}else{
echo($inva->CatName);
$catTitle="$inva->CatName";
}
echo ('<li>' . $inva->PageName . '</li>');
}
Thank you pickupman for the assistance!!! VERY much appreciated. Now I can move forward with the project and use this ability elsewhere.