Edit report at https://bugs.php.net/bug.php?id=65757&edit=1

 ID:                 65757
 Updated by:         ahar...@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

Reply via email to