PDO::setAttribute

(no version information, might be only in CVS)

PDO::setAttribute --  Set an attribute

Description

bool PDO::setAttribute ( int attribute, mixed value )

Sets an attribute on the database handle. Some of the available generic attributes are listed below; some drivers may make use of additional driver specific attributes.

  • PDO_ATTR_CASE: Force column names to a specific case.

    • PDO_CASE_LOWER: Force column names to lower case.

    • PDO_CASE_NATURAL: Leave column names as returned by the database driver.

    • PDO_CASE_UPPER: Force column names to upper case.


add a note add a note User Contributed Notes
m dot leuffen at gmx dot de
26-Jul-2006 09:44
Hi,

if you are wondering about a size-bound (1 MB) on blob and text fields after upgrading to PHP5.1.4. You might try to increase this limit by using the setAttribute() method.

This will fail. Instead use the options array when instantiating the pdo:

$pdo = new PDO ("connection_settings", "user", "pass", array
(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE=>1024*1024*50));

This should fix the problem and increase the limit to 50 MB.

Bye,
  Matthias