• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Not getting column from database correct?

#2
It did not work with the db select for some reason so just went with db get and where

PHP Code:
<?php

class Set_language {

    public function 
__construct() {
        
$this->ci =& get_instance();
        
//$this->ci->config->set_item('language', $this->lang());
    
}

    public function 
lang() {
        
$this->ci->db->where('code'$this->get_lang());
        
$query $this->ci->db->get($this->ci->db->dbprefix 'language');

        
$row $query->row();
        return 
$row->directory;
    }

    public function 
get_lang() {
        
$this->ci->db->where('item_name''admin_language');
        
$query $this->ci->db->get($this->ci->db->dbprefix 'setting');

        
$row $query->row();
        return 
$row->item_value;
    }

There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
RE: Not getting column from database correct? - by wolfgang1983 - 12-17-2015, 03:10 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.