Codeigniter: bug: ODBC does not return correctly the results aliasing

Created on 12 Sep 2018  路  4Comments  路  Source: bcit-ci/CodeIgniter

HI, as posted by @narfbg i posted a new issue event try to explain that older issues was "partially" resolved ..

we cannot do complex joins, call to procedures recursivelly or as simple we cannot make alias of a column:, and as a note, the fixeds of current odbc does not permit handle resultset due are using arrays to that.. causing out of memory in manny maners

THE SQL: SELECT top 1 cedula as codficha, ValorEgreso as condicion FROM dbo.Historia.

RESULT OBTAINED:

array(1) { [0]=> array(2) { ["cedula"]=> string(8) "11618438" ["ValorEgreso"]=> string(1) "1" } }

application/views/welcome_message.php

EXPECTED RESULT:

array(1) { [0]=> array(2) { ["codficha"]=> string(8) "11618438" ["condicion"]=> string(1) "1" } }

application/views/welcome_message.php

procedure to reporduce:

  1. define a odbc access to msssql/sybase/etc db in database.php (here names "saint" the group)
  2. download and setup the CI3 stable
  3. open the welcome controller and paste/sustitute index method code by:
public function index()
 {
  $this->load->database('saintdb',TRUE);
  $sql = "
            SELECT top 1 
             cedula as codficha, ValorEgreso as condicion 
            FROM 
             dbo.Historia
            ";
        $query = $this->db->query($sql);
        $arr_rst = $query->result_array();

        var_dump($arr_rst);

CHECKS:

  1. There is not already an open Issue about ODBC, all checked and closed
  2. The issue has already been fixed? : checked devbeloper brand and closed and seems was bad resolved
  3. Is it something really obvious that you can fix yourself? Obviously not!

All 4 comments

ok i revised the odbc_result.php and see that there's a alrady own made resultset management, as i posted we need to find a way to handle without using arrays unless to return final out! i need more helpo obviously,

NOTES:

  • i tested the odbc FreeTDS module and works inclusivelly using isql command line
  • i not tested pure php odbc methods or older versions (already working) of CI2 but i'll test and report here

If you specify an alias in SQL and the result set is returned without it, that's the database's fault. It's not CI's job to inspect your raw SQLs and mangle result sets based on that.

And for the last time, we don't care about CI2. CI2 is dead and gone, officially so for almost 3 years, and you're a fool for pursuing anything related to it.

@narfbg are you very close to hear the ovvious, with other frameworks the qeury works pleny! and with the isql command line are working! and with the freedts command line are working!

the issue are agian CI3 men! open your eyes!

hey @narfbg are you blind? see picture! DB problem! i pleny setup sameproblem

if you made the query agains the isql command works!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

boblennes picture boblennes  路  4Comments

monski picture monski  路  4Comments

casa10 picture casa10  路  5Comments

rjdjohnston picture rjdjohnston  路  4Comments

huehnerhose picture huehnerhose  路  6Comments