Undefined index: id error

One more thing. I have method in main controller which runs each time page is refreshed:
function handle_session_data()
        if($this->session->userdata('group_id') == FALSE)
            // zapisz dane w sesji
            $query = $this->db->getwhere($this->tb['users_groups'], array('id' => '0'));

            $newdata = array(
                   'user_name'    => 'Nieznajomy'
                   ,'group_id'    => '0'
                   ,'group_name'=> 'Goście'
            $this->content->content['group_name'] = $newdata['group_name'];
            $this->content->content['user_name'] = $newdata['user_name'];

            $this->content->content['group_name'] = $this->session->userdata('group_name');
            $this->content->content['user_name'] = $this->session->userdata('user_name');

this: $this->content->content is variable of my own library Content that generates the result Smile

completely stucked with my code... Sad

OK I found it Smile

The query should look like this:

$q = "select id,login,password,name,surname,group_id from ".$this->tb['users']." where login='".$data['login']."' and password='".$data['password']."'";

not like:

$q = 'select id,login,password,name,surname,group_id from '.$this->tb['users'].' where login="'.$data['login'].'" and password="'.$data['password'].'"';

It is Oracle specific issue. BTW, I've rearnt how to turn on error logging Smile

Thanks for quick response @deviant!

Yeah I figured it would be something to do with Oracle, and since I've like never used Oracle it would have been beyond me Tongue

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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