#41596 [Opn->Fbk]: crash. when sql syntax is invalid

From: Date: Tue, 05 Jun 2007 10:56:51 +0000
Subject: #41596 [Opn->Fbk]: crash. when sql syntax is invalid
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-113402@lists.php.net to get a copy of this message
ID: 41596 Updated by: tony2001@php.net Reported By: develar at gmail dot com -Status: Open +Status: Feedback Bug Type: PDO related Operating System: Windows XP SP2 PHP Version: 5.2.3 New Comment: Please define "crash". Previous Comments: ------------------------------------------------------------------------ [2007-06-05 10:48:12] develar at gmail dot com Description: ------------ 'delete from users."users where id = :id' is wrong, must be 'delete from users."users" where id = :id', but why pdo crash. Reproduce code: --------------- <?php $Db = new PDO('pgsql:host=192.168.0.66;dbname=test', 'postgres', 'password'); $Db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); $Db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); $Pdo = $Db->prepare('delete from users."users where id = :id'); $Pdo->bindValue(':id', 45, PDO::PARAM_INT); $Pdo->execute(); ?> Expected result: ---------------- not crash Actual result: -------------- crash ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41596&edit=1

« previous php.bugs (#113402) next »