php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #56296 PDO::quoteName() method
Submitted: 2005-02-12 06:59 UTC Modified: 2006-09-11 08:02 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: Jared dot Williams1 at ntlworld dot com Assigned:
Status: Wont fix Package: PDO (PECL)
PHP Version: 5_0 CVS-2005-02-12 (dev) OS: Windows 2000/IIS
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-02-12 06:59 UTC] Jared dot Williams1 at ntlworld dot com
Description:
------------
Quotes database object names (tables, column, etc) for when they clash with reserved words.

mssql and sqlite uses [tablename], mysql `tablename` etc




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-12 12:04 UTC] wez@php.net
While I can see the utility, PDO can't guarantee that it will know the correct quoting characters in all cases.
Aside from this, PDO leaves the writing of queries largely in your hands (who better to know their database schema?), or in the hands of a more heavy-weight abstraction layer.
There are no plans for this feature at this time.
 [2006-09-11 08:02 UTC] smith at pooteeweet dot org
I think you misunderstood the request. The request was for a method similar to quote() just for identifier along the lines of MDB2's quoteIdentifier() method:
http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Driver_Common.html#methodquoteIdentifier

So it would place double quotes, brackets or backticks around the identifier.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC