php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57676 PDO_IBM has problems with XQuery
Submitted: 2007-05-18 12:29 UTC Modified: 2007-05-20 21:53 UTC
From: thorsten at phpmyfaq dot de Assigned:
Status: Duplicate Package: PDO_IBM (PECL)
PHP Version: 5.1.6 OS: Windows XP
Private report: No CVE-ID: None
 [2007-05-18 12:29 UTC] thorsten at phpmyfaq dot de
Description:
------------
With IBM DB2 9.1 you can use XQuery for XML data.

This code produces an error, but works in the DB2 Control Center:

xquery db2-fn:xmlcolumn('TALKS.TALKS');

Sorry for the German error messages...

Reproduce code:
---------------
<?php
    $stmt = $db->prepare("xquery db2-fn:xmlcolumn('TALKS.TALKS')");
    if ($stmt->execute()) {
        foreach ($stmt->fetch() as $data) {
            var_dump($data);
        }
    } else {
        print_r($stmt->errorInfo());
    }

Expected result:
----------------
After XML serialization:

<talks>
<talk id="1">
	<presenter>
		Thorsten Rinne
	</presenter>
	<title>
		IBM DB2 mit PHP 5.2 und AJAX
	</title>
	<date>
		2007-05-23
	</date>
</talk>
</talks>

Actual result:
--------------
Array
(
    [0] => 10505
    [1] => -16002
    [2] => [IBM][CLI Driver][DB2/NT] SQL16002N  In einem XQuery-Ausdruck folgt ein unerwartetes Token "?" auf "db2-fn". Zu den m?glichen Token geh?ren: "". Fehler QName=err:XPST0003.  SQLSTATE=10505
 (SQLExecute[-16002] at ext\pdo_odbc\odbc_stmt.c:133)
    [3] => 10505
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-20 21:53 UTC] opendev at us dot ibm dot com
This defect has already been raised and is an open issue with the PDO layer.  You can view comments and track progress on the defect at the following address:
  http://www.pecl.php.net/bugs/bug.php?id=10225
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 21:01:29 2024 UTC