#41996 [Asn->Csd]: PDO_OCI: Problem accessing Oracle ROWID

From: Date: Mon, 21 Jul 2008 18:05:22 +0000
Subject: #41996 [Asn->Csd]: PDO_OCI: Problem accessing Oracle ROWID
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-127085@lists.php.net to get a copy of this message
ID: 41996 Updated by: pajoye@php.net Reported By: tsedeke at feigenblatt dot de -Status: Assigned +Status: Closed Bug Type: PDO related Operating System: Suse Enterprise Server 9 PHP Version: 5.2.3 Assigned To: sixd New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-09-06 14:22:19] rubio at jsc dot com dot ar Try to replace your query with: "SELECT ROWIDTOCHAR(rowid),t1,t2 FROM test" Hope this helps... -- Jonatan ------------------------------------------------------------------------ [2007-08-23 14:51:07] jani@php.net Assigned to the PDO OCI driver maintainer. ------------------------------------------------------------------------ [2007-07-14 14:45:08] tsedeke at feigenblatt dot de Description: ------------ Getting error accessing the oracle rowid in a PDO select statement. The NLS_LANG is set to AMERICAN_AMERICA.AL32UTF8 same as the database. I also restartet the Apache2.2 with the php as module, to be sure it take the right parameters. Reproduce code: --------------- $db_username = "elements"; $db_password = "elements"; $db = "oci:dbname=XE;charset=AL32UTF8"; $conn = new PDO($db,$db_username,$db_password); $stmt = $conn->prepare("SELECT rowid,t1,t2 FROM test"); $stmt->execute(); while ($row = $stmt->fetch()) { print_r($row); } Expected result: ---------------- Array ( [ROWID] => AAADVUAAEAAAAFMAAA [0] => AAADVUAAEAAAAFMAAA [T1] => test1 [1] => test1 [T2] => First test [2] => First test ) Actual result: -------------- Warning: PDOStatement::fetch() [function.PDOStatement-fetch]: column 0 data was too large for buffer and was truncated to fit it ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41996&edit=1

« previous php.bugs (#127085) next »