php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62782 Allow PDO::MYSQL_ATTR_FOUND_ROWS in $driver_options argument of PDO->prepare()
Submitted: 2012-08-08 17:12 UTC Modified: 2020-12-10 12:03 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: cmanley at xs4all dot nl Assigned:
Status: Wont fix Package: PDO MySQL
PHP Version: 5.3.15 OS:
Private report: No CVE-ID: None
 [2012-08-08 17:12 UTC] cmanley at xs4all dot nl
Description:
------------
Currently PDO::MYSQL_ATTR_FOUND_ROWS is supported as an option in the PDO 
constructor.

It would be even better if this option was additionally supported in the 
$driver_options argument of PDO->prepare().

The reason being that the option can be applied only locally where needed, and not 
in all statements executed by the current PDO object with the possibility of 
wreaking havoc in larger applications that share a PDO connection object.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-01 22:48 UTC] adambaratz@php.net
-Package: PDO related +Package: PDO MySQL
 [2017-09-27 07:59 UTC] col dot shrapnel at gmail dot com
Given CLIENT_FOUND_ROWS is a connection option that can be used with mysql_real_connect() only, there is no way to change its value on the fly, so this issue can be closed as not a bug.
 [2020-12-10 12:03 UTC] nikic@php.net
-Status: Open +Status: Wont fix
 [2020-12-10 12:03 UTC] nikic@php.net
Indeed, this is an option that must be specified when establishing the connection to the server. Supporting it in PDO::prepare() is technically not possible.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 19:01:27 2024 UTC