From: SKerres at Kerres-edv dot de
Operating system: Windows 2003
PHP version: 5.1.0RC6
PHP Bug Type: PDO related
Bug description: XML Datatype / SQL 2005
Description:
------------
I tried to select data from an SQL2005 table witch contains the new
SQL2005 datatype XML.I got no data, but an warning.
Reproduce code:
---------------
CREATE TABLE XMLDaten
(
XDA_Titel varchar(30) NOT NULL,
XDA_XML xml
)
------------------------------------------------
$con = new PDO('mssql:host=Server;initial
catalog=Adressen','pschmidt','password');
foreach($con->query('SELECT * FROM dbo.XMLDaten') AS $Zeile)
{
echo '<br>';
var_dump($Zeile);
}
Expected result:
----------------
Data
Actual result:
--------------
Warning: Invalid argument supplied for foreach() in
c:\Inetpub\wwwroot\sql2005.php on line 6
--
Edit bug report at http://bugs.php.net/?id=35283&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35283&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=35283&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=35283&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35283&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35283&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35283&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35283&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35283&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35283&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35283&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35283&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35283&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35283&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35283&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35283&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35283&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35283&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35283&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35283&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35283&r=mysqlcfg