Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-128

[PHP]Passing field parameter in the form of tablename.fieldname to cubrid_result method will fail

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: PHP-8.4.1
    • Fix Version/s: PHP-8.4.1, PHP-Apricot
    • Component/s: PHP Driver
    • Labels:
      None

      Description

      Test Build: CUBRID 2008 R4.1 (8.4.1.1018) (64bit release build for linux_gnu)
      OS: Linux 64
      Description:
      The form of field parameter for cubrid_result() method:
      It can be the field's offset, the field's name, or the field's table dot field name (tablename.fieldname)

      if using the form tablename.fieldname, error will appear.

      Repro steps:
      1. execute: php result_test.phpt
      statements in result_test.phpt

      $conn = cubrid_connect("localhost", 33113, "demodb");
      $req = cubrid_execute($conn, "SELECT * FROM code");
      $result = cubrid_result($req, 0);
      var_dump($result);
      $result = cubrid_result($req, 0, 1);
      var_dump($result);
      $result = cubrid_result($req, 5, "f_name");
      var_dump($result);
      //$result = cubrid_result($req, 5, code.f_name);
      //var_dump($result);
      $result = cubrid_result($req, 5, "code.f_name");
      var_dump($result);
      cubrid_close_request($req);
      cubrid_disconnect($conn);
      

      Actual result:

      string(1) "X"
      string(5) "Mixed"
      string(4) "Gold"
      PHP Warning:  Error: CCI, -13, Column index is out of range in /home/php/phpTestcases/_02_prepare/result_test.phpt on line 12
      bool(false)
      

      Expect result:

      string(1) "X"
      string(5) "Mixed"
      string(4) "Gold"
      string(4) "Gold"
      

        Activity

        Hide
        hellohuizhang 张慧 added a comment -

        Commit rev: 487

        Show
        hellohuizhang 张慧 added a comment - Commit rev: 487
        Hide
        zoujing ZouJing added a comment -

        Test build : CUBRID 2008 R4.1 (8.4.1.1018)
        OS: Linux 64bit
        Test Result: PASS
        so i close it

        Show
        zoujing ZouJing added a comment - Test build : CUBRID 2008 R4.1 (8.4.1.1018) OS: Linux 64bit Test Result: PASS so i close it

          People

          • Assignee:
            zoujing ZouJing
            Reporter:
            zoujing ZouJing
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: