1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

PHP OpenEdge ODBC not returning field names

Discussão em 'StackOverflow' iniciado por fdantas, Novembro 6, 2017.

  1. fdantas

    fdantas Administrator Moderador

    Migrating our physical server to a VM and are running into an issue with a page using OpenEdge ODBC to grab data. The local machine is returning the correct data and array format. The VM is returning the values as field names and missing some fields as well.

    Local Machine Results:

    [billoflading] => 36003
    [Codcliente] => 785
    [Confirmado] => 0
    [Enviara] =>
    [Exportado] => 0
    [Fembarcado] => 2017-11-02
    [Hembarcado] => 52856
    [Linea] =>
    [pull_num] => 105461
    [Salesorder] => 1151086
    [Tipo] =>
    [Trailer] => 7327
    [transmitido] => 1


    VM Results:

    [36003] => 36003
    [785] => 785
    [0] => 0
    [] =>
    [2017-11-02] => 2017-11-02
    [52856] => 52856
    [105461] => 105461
    [1151086] => 1151086
    [7327] => 7327
    [1] => 1


    The test machine and VM are using the same exact version of code and OpenEdge drivers. PHP versions are different but the physical server (which still works) is on an older version. Checked php.ini and they are configured exactly the same. We are using Laravel but all 3 versions (local, VM, & physical) are the same.

    The code snippet:

    $conn_id = odbc_connect("****","****","****", SQL_CUR_USE_ODBC);
    $sql = "Select * FROM PUB.Shipper where billoflading ='36003'";

    $result = odbc_do($conn_id, $sql);

    echo "<pre>";

    while($row = odbc_fetch_array($result)){
    print_r($row);
    }

    echo "</pre>";


    Any help is appreciated!

    Continue reading...

Compartilhe esta Página