|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2006-04-25 01:29 UTC] wez@php.net
  [2006-04-25 12:13 UTC] phyre at rogers dot com
  [2006-05-29 15:04 UTC] spam01 at pornel dot net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Thu Oct 30 12:00:01 2025 UTC | 
Description: ------------ PDO Driver for MySQL, client library version: 4.1.11 MySQL Server: MySQL 4.0.24 Reproduce code: --------------- try { $dbc = new PDO ("mysql:host=myhost;dbname=mydb", "myuser", "mypass"); $dbc->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); } catch (PDOException $e) { echo $e->getMessage(); } echo $dbc->getAttribute(PDO::ATTR_CONNECTION_STATUS)."\n"; $strsql = "SELECT * FROM `ewcms_article`"; $dbq = $dbc->query($strsql); if ($dbq === false) echo "false\n"; echo getType($dbq)."\n"; print_r($dbc->errorInfo()); echo "\n".$dbc->getAttribute(PDO::ATTR_CONNECTION_STATUS); Expected result: ---------------- This should not return false and instead return the proper PDOStatement object. It seems that it's not checking for MySQL 4.0 before executing the prepare statements (or so I guess) and is failing with an 'unknown command' error. Also, there is no warning or exception thrown at all from this failure of the query. Actual result: -------------- myhost via TCP/IP false boolean Array ( [0] => 00000 [1] => 1047 [2] => Unknown command ) myhost via TCP/IP