php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #65757 Please implement quote_identifier() method as done in Perl's DBI.
Submitted: 2013-09-25 07:22 UTC Modified: 2013-09-25 22:12 UTC
From: cmanley at xs4all dot nl Assigned:
Status: Duplicate Package: PDO related
PHP Version: 5.4.20 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cmanley at xs4all dot nl
New email:
PHP Version: OS:

 

 [2013-09-25 07:22 UTC] 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) . '`';
}



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-25 22:12 UTC] aharvey@php.net
-Status: Open +Status: Duplicate
 [2013-09-25 22:12 UTC] aharvey@php.net
Duplicate of request #38196.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC