HELP: Can't Display Data - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: HELP: Can't Display Data (/showthread.php?tid=62547) |
HELP: Can't Display Data - Maaacoooo - 07-27-2015 Hi. I am very new to CodeIgniter and I am using v2.2.3. I managed to create the following code but I am unable to display the data. Here is my Model Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Here is my Controller Code: function item() I am unable to display data by getting the ID. I hope anyone can help RE: HELP: Can't Display Data - mwhitney - 07-27-2015 You should probably be using CodeIgniter 3 if you're just getting started. 2.2.3 will reach end of life in October. As for your problem, you haven't included your view code or really given an accurate description of your problem. By looking at your code, $results should be either FALSE or an array of row objects, so you would check in your view (since you aren't checking in your controller): PHP Code: <?php if ($results === FALSE) : ?> |