Selecting views - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Selecting views (/showthread.php?tid=12821) |
Selecting views - El Forum - 11-01-2008 [eluser]no_Ob[/eluser] Hi there I have got a very annoying problem which is looks like quite simple,but I can't figure it out. I would like to choose the loaded view according to the database results. Controller: Code: class Categories extends Controller { Model Code: class Shopmodel extends Model { If I have no results, it doesnt load the other view Why is this happening? Selecting views - El Forum - 11-01-2008 [eluser]Randy Casburn[/eluser] Are you sure it doesn't load the view, or does it load the view and not show any data? Where have you declared or assigned any values to $database in the method choice()? Randy Selecting views - El Forum - 11-01-2008 [eluser]no_Ob[/eluser] You are right it. It loads everytime the product/game view. Sorry this $database variable has to be renamed to $data Selecting views - El Forum - 11-01-2008 [eluser]Randy Casburn[/eluser] Great! Glad it was easy and glad I could help, Randy Selecting views - El Forum - 11-02-2008 [eluser]no_Ob[/eluser] Thank you very much MadZo |