Part of the EllisLab Network

Bug Report

Oracle limit() bug

Date: 05/18/2008 Severity: Critical
Status: New Reporter: inari
Version: 1.6.1
Keywords: Libraries, Database Class
Forum Thread: http://codeigniter.com/forums/viewthread/79784/

Description

These fields with strange names are some weird response from oracle when using same column names in many tables. I guess that this Oracle handle to prevent fields with the same name, but they only comes when using limit.

Code Sample

$this->db->join('contacts','contacts.co_id=activities.co_id','left');
$this->db->join('employees','employees.e_id=activities.e_id','left');
        
$this->db->limit(10);
$this->db->order_by('activities.a_date','desc');
$this->db->order_by('activities.a_id','desc');
        
        
$data = $this->db->get_where('activities',array('activities.c_id' =>$id))->result();

Expected Result

Array
(   [0] => stdClass Object
      (
        [a_id] => 301
        [a_date] => 1210802400
        [c_id] => 1
        [a_comment] => wewewe
        [a_subject] => wewe
        [co_id] => 2
        [e_id] =>
        [a_status] => 1
        [co_name] => Milivoj
        [co_surname] => Trtica
        [co_position] => Poreznik
        [co_tel] => 01/8888588
        [co_fax] => 2
        [co_email] => milivoj@trtica.tr
        [e_name] =>
        [e_surname] =>
      )

)

Actual Result

Array
(   [0] => stdClass Object
      (
        [a_id] => 301
        [a_date] => 1210802400
        [qcsj_c000000000500002] => 1
        [a_comment] => wewewe
        [a_subject] => wewe
        [qcsj_c000000000500000] => 2
        [qcsj_c000000000700000] =>
        [a_status] => 1
        [qcsj_c000000000500001] => 2
        [qcsj_c000000000500003] => 1
        [co_name] => Milivoj
        [co_surname] => Trtica
        [co_position] => Poreznik
        [co_tel] => 01/8888588
        [co_fax] => 2
        [co_email] => milivoj@trtica.tr
        [qcsj_c000000000700001] =>
        [e_name] =>
        [e_surname] =>
        [rnum] => 1
      )

)

Comment on Bug Report

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?