php.net |  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: 2021-09-26 04:22 UTC
Votes:1
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: cmb (profile)
Status: No Feedback Package: PDO_INFORMIX (PECL)
PHP Version: Irrelevant OS: RED HAT Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: littlebuzzfl at gmail dot com
New email:
PHP Version: OS:

 

 [2013-06-10 16:29 UTC] littlebuzzfl at gmail dot com
Description:
------------
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:
---------------
<?php
// 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);
$res->execute();
$uid = $db->lastInsertId();
printf("\$res->RowCount() = %d, \$db->lastInsertId = $uid\n", $res->RowCount());
$res = $db->prepare("select info from blobtest where uid = $uid");
$res->execute();
$res->bindColumn(1, $info);
$res->fetch();
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-09-14 14:20 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-09-14 14:20 UTC] cmb@php.net
Is that still an issue with latest PDO_INFORMIX (1.3.4)?
 [2021-09-26 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 10:03:35 2021 UTC