php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #41059 Perhaps PDO could have a settable readonly attribute
Submitted: 2007-04-11 22:35 UTC Modified: 2007-04-11 22:37 UTC
From: leifspb at gmail dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.1 OS: Linux
Private report: No CVE-ID: None
 [2007-04-11 22:35 UTC] leifspb at gmail dot com
Description:
------------
Perhaps PDO could have a settable readonly attribute. That way scripts which only require readonly access would be that much more secure. Of course, this could be implemented as a second database user which only has readonly access but some people may be on shared hosts which only give one database user.  There is no substitute for properly escaping all user input but this could provide one more layer of protection.

Reproduce code:
---------------
N/A

Expected result:
----------------
N/A

Actual result:
--------------
N/A

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-11 22:37 UTC] tony2001@php.net
To do that PDO would need a full-featured SQL parser to distinguish between read and write SQL statements.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 27 02:00:03 2025 UTC