|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-24 10:32 UTC] jani@php.net
[2007-10-05 14:54 UTC] mpub at meiners-online dot de
[2007-10-08 10:55 UTC] mpub at meiners-online dot de
[2008-09-15 13:23 UTC] johannes@php.net
[2008-09-23 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 08:00:02 2025 UTC |
Description: ------------ PDO doesn`t throw Exception when querying a sql with syntax error as expected. MySQL Client Version: 5.0.45 MySQL Server Version: 4.0.16 But if I connect to a MySQL5 server, it throws Exception correctly. Same error happened in php-5.2.2 Reproduce code: --------------- $dbt = new PDO("mysql:host=xxx;port=xxx;dbname=xxx",'xxx','xxx'); $dbt->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $a = $dbt->query("what happened?"); Expected result: ---------------- PDO should throw a Exception Actual result: -------------- nothing is throwed