PHP PDO Values for setAttributes() of PDO::ATTR_AUTOCOMMIT and PDO::MYSQL_ATTR_USE_BUFFERED_QUERY

95
November 23, 2020, at 07:10 AM

Looking at the documentation of the PDO::setAttribute for example the paragraph of:

PDO::ATTR_STRINGIFY_FETCHES

the description states:

Convert numeric values to strings when fetching. Requires bool

so it is obvious how to set that attribute:

$dbh = new PDO($dsn, $user, $password);
$dbh->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true);
// or
$dbh->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);

but these don't have any information about values they accept

PDO::ATTR_AUTOCOMMIT
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY

Therefore I have a few questions:

  1. Do the attributes PDO::ATTR_AUTOCOMMIT and PDO::MYSQL_ATTR_USE_BUFFERED_QUERY accept bool values?

  2. Is there any reference to the values they accept?

Rent Charter Buses Company
READ ALSO
How to verify SQL result is empty and then perform an action in PHP? [closed]

How to verify SQL result is empty and then perform an action in PHP? [closed]

Want to improve this question? Update the question so it's on-topic for Stack Overflow

81
What is the argument's type for a method that takes indefinite nested arrays?

What is the argument's type for a method that takes indefinite nested arrays?

I am trying to build a static method that traverses a nested array of arraysI would like to set this method argument to accept any number of nested arrays

102
Javascript callbacks in arbitrary order [closed]

Javascript callbacks in arbitrary order [closed]

Want to improve this question? Update the question so it's on-topic for Stack Overflow

89
How do i find the number of children elements with a specific class with vanilla javascript

How do i find the number of children elements with a specific class with vanilla javascript

I have a row that is auto populated with data from an apiEach result from the api is stored in a div which is created with js as well and then a class is appended to it

15