How to get value column where column in codeigniter 3 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: How to get value column where column in codeigniter 3 (/showthread.php?tid=64172) |
How to get value column where column in codeigniter 3 - cnttlc - 01-22-2016 I have a table like: Code: sysopt|sysval in mysql i use: Code: $query = $db->query("SELECT * FROM sysconfig"); But in CI: Code: class Sysinfo In view i call: Code: <?php echo $this->Sysinfo->info->site_url; ?> Show error. Code: Message: Undefined property: CI_Loader::$Sysinfo Thankyou any solution fix. RE: How to get value column where column in codeigniter 3 - InsiteFX - 01-23-2016 You can try this, but it is not recommended to do in a view it should be done in your controller. PHP Code: <?php RE: How to get value column where column in codeigniter 3 - keulu - 01-28-2016 yo you affect your data directly to $infos array in your controller. $this->info['site_url'] = 'http://www.google.com'; so why do you call $this->Sysinfo->info->site_url ? call directly echo $this->info['site_url']; // will show "http://www.google.com" |