|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65007 RowCount() incorrect when inserting bindParam of type PARAM_LOB
Submitted: 2013-06-10 16:29 UTC Modified: -
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: littlebuzzfl at gmail dot com Assigned:
Status: Open Package: PDO_INFORMIX (PECL)
PHP Version: Irrelevant OS: RED HAT Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-06-10 16:29 UTC] littlebuzzfl at gmail dot com
When inserting a row with a bindParam of type PARAM_LOB, the row gets inserted successfuly however the RowCount() returns 0 instead of 1. 

Test script:
// Replace USERNAME, PASSWORD, SERVER, PORT, DATABASE, and SERVER_NAME with your own values for testing
$un = "USERNAME";
$pw = "PASSWORD";
$dbinfo = "informix:host=SERVER; service=PORT; database=DATABASE; server=SERVER_NAME; protocol=onsoctcp; EnableScrollableCursors=1;";
$db = new PDO($dbinfo, $un, $pw);
$db->query("create table blobtest ( uid serial not null, info text not null )");
$res = $db->prepare("insert into blobtest values (0, ?)");
$res->bindParam(1, sprintf("Test Blob Time = %s", strftime("%D %T", time())), PDO::PARAM_LOB);
$uid = $db->lastInsertId();
printf("\$res->RowCount() = %d, \$db->lastInsertId = $uid\n", $res->RowCount());
$res = $db->prepare("select info from blobtest where uid = $uid");
$res->bindColumn(1, $info);
printf("Read back '{$info}' from inserted row uid = $uid, however num rows inserted says 0 instead of 1!\n");

Expected result:
I expect to see the RowCount() to be 1

Actual result:
RowCount() returns 0


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Apr 04 10:01:25 2020 UTC