Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003796 [Quercus] major always 12-02-09 01:52 12-02-09 01:52
Reporter Heiko View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 4.0.2
  Product Build
Summary 0003796: pg_query_params doesn't return true value on non-select statements
Description When using update/insert/delete statements with pg_query_params, quercus returns a false value, even if the query was successful. It is therefore not possible to test the correctness of the query and the following code fails:

$sqlsentence =
          'UPDATE Sessions SET sessionstate = $1, accesstime = $2 ' .
          'WHERE sessionid = $3';
$result = pg_query_params($mmDbConnection, $sqlsentence, array($s1, $AccessTime, $mmSessionId));
if (!$result) {
   ...handle error...
}
Steps To Reproduce
Additional Information http://php.net/manual/en/function.pg-query-params.php: [^]

Return Values

A query result resource on success or FALSE on failure.


/com/caucho/quercus/lib/db/PostgresModule.java #executeInternal:
      if (pstmt.getStatementType().equals("SELECT")) {
        PostgresResult result = new PostgresResult(env, null, pstmt.getResultSet(), null);
        conn.setResultResource(result);
        return result;
      } else {
        // XXX: ??? return type?
        return null;
        // return pstmt;
      }
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
12-02-09 01:52 Heiko New Issue


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
26 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker