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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Wed Apr 24 15:01:30 2024 UTC