ID: 38736
User updated by: mjsabby at gmail dot com
Reported By: mjsabby at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: PDO related
Operating System: Fedora Core 5
PHP Version: 5.1.6
New Comment:
See Bug #38737
Previous Comments:
------------------------------------------------------------------------
[2006-09-07 01:31:25] mjsabby at gmail dot com
Description:
------------
PHP 5.1.6
MySQL 5.0.19-standard
Fedora Core 5
prepare() or query() alwyas fails, regardless of syntactically correct
SQL or not, atleast for MySQL.
MySQL(i) client libraries work perfectly, but the PDO with the exact
same query fails.
Reproduce code:
---------------
<?php
define('DB_DSN', 'mysql:localhost;dbname=xxx');
define('DB_USER', 'xxx');
define('DB_PASS', 'xxx');
try {
$dbh = new PDO(DB_DSN, DB_USER, DB_PASS);
} catch (PDOException $e) {
die($e->getMessage());
}
$query = $dbh->query("SELECT * FROM users") or echo("BOO");
$prepa = $dbh->prepare("SELECT * FROM users") or echo("BOO2");
$dbh = null;
?>
Expected result:
----------------
Run the query
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38736&edit=1