HELP: Can't Display Data |
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
07-27-2015, 10:12 AM
(This post was last modified: 07-27-2015, 10:13 AM by mwhitney. Edit Reason: fix PHP tags )
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) : ?> |
Welcome Guest, Not a member yet? Register Sign In |