PDO returns SQLSTATE error on valid queries.
| Bug #35508 | PDO returns SQLSTATE error on valid queries. | ||||
|---|---|---|---|---|---|
| Submitted: | 2005-12-01 19:35 UTC | Modified: | 2005-12-01 21:01 UTC | ||
| From: | capiCrimm at gmail dot com | Assigned: | |||
| Status: | Closed | Package: | PDO related | ||
| PHP Version: | 5.1.1 | OS: | Debian | ||
| Private report: | No | CVE-ID: | None | ||
[2005-12-01 19:35 UTC] capiCrimm at gmail dot com
Description:
------------
When creating a temporary table with PDO it returns an
error when you try to use the table. The database I'm
running is mysql 14.7. The queries run fine in mysql CLI.
I've tried switching around the query values and changing
tables and databases. Error occurs both in php CLI and
mod_php. I'm pretty sure Temp tables were working in RC1,
though I may be remembering wrong.
Reproduce code:
---------------
<?php
$pdoConnection = new PDO('mysql:dbname=gDev;host=localhost;','root','');
$pdoConnection->query('CREATE TEMPORARY TABLE TestC(str1 INT(1),str2 INT(1));');
$pdoConnection->query("INSERT INTO TestC VALUES(1,1);", PDO_RESULT_ASSOC); // line 6
?>
Expected result:
----------------
A Blank Page
Actual result:
--------------
Warning: PDO::query() [function.query]: SQLSTATE[22003]:
Numeric value out of range: unhandled mode; this is a PDO
bug, please report it in /file.php on line 6
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2005-12-01 21:01 UTC] tony2001@php.net