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

240 Views Asked by At

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?

0

There are 0 best solutions below