Menu

cubrid_execute() returns NO value when fail

Developers
Laura Oh
2010-12-29
2013-06-05
  • Laura Oh

    Laura Oh - 2010-12-29

          2 <?php
          3 /*========================================
          4  - mem(3.31MB)
          5 null result: insert into "xe_counter_site_status" ("site_srl","regdate","unique_visitor","pageview") values (19318306,0,0,0); /* counter.insertSiteTodayStatus */
          6 ---------------------------*/
          7 ?>
          8
          9 <?php
         10 /*========================================
         11  - mem(3.31MB)
         12 -670 ,Operation would have caused one or more unique constraint violations.: insert into "xe_counter_site_status" ("site_srl","regdate","unique_visitor","pageview") values (19318306,0,0,0); /* counter.insertSiteTodayStatus */
         13 ---------------------------*/

    this is php error file which shows that when the INSERT fails, cubrid_execute returns NOTHING so that null result error occurs together.

    the spec, when fails it should return -1.
    cubrid_execute() codes are implemented that
    when not prepared and use the query directly,cubrid_execute() internally prepares the query and then execute.

    However, when the query error occurs, cubrid_execute returns different value. -1 and NOTHING.
    case1: when user preapre and then execute the query-> when query fails, error message & -1 refurned.
    case2: when no preapre and execute the query-> when query fails, error message only  refurned.

    If possible to fix to return as same as case 1 and case 2 like our spec and mysql does, please fix it.

    <test php driver: r3.0 (build from the cubrid linux source)

     
  • thorny-road

    thorny-road - 2010-12-31

    I have tried to reproduce this bug, but I failed. I also reviewed the codes and not found obvious problem in cubrid_execute.

    We can provide a well-formated bug report system like BTS to the users in order to get more info about the bug.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.