Req #65757 [Opn->Dup]: Please implement quote_identifier() method as done in Perl's DBI.

From: Date: Wed, 25 Sep 2013 22:12:25 +0000
Subject: Req #65757 [Opn->Dup]: Please implement quote_identifier() method as done in Perl's DBI.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-181778@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65757&edit=1 ID: 65757 Updated by: aharvey@php.net Reported by: cmanley at xs4all dot nl Summary: Please implement quote_identifier() method as done in Perl's DBI. -Status: Open +Status: Duplicate Type: Feature/Change Request Package: PDO related PHP Version: 5.4.20 Block user comment: N Private report: N New Comment: Duplicate of request #38196. Previous Comments: ------------------------------------------------------------------------ [2013-09-25 07:22:41] cmanley at xs4all dot nl Description: ------------ --- From manual page: http://www.php.net/pdo.quote#refsect1-pdo.quote-seealso --- Besides the quote() method, a quote_identifier() method would be very helpful for quoting table and field names. This method exists in Perl's DBI: http://search.cpan.org/dist/DBI/DBI.pm#quote_identifier Basically emulate this MySQL specific method for each driver: public function quote_identifier($value) { return '' . str_replace('', '`', $value) . ''; } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65757&edit=1

« previous php.bugs (#181778) next »