Top "Pdo" questions

PDO (PHP Data Objects) is a data-access abstraction layer (interface) for PHP.

Persistent DB Connections - Yea or Nay?

I'm using PHP's PDO layer for data access in a project, and I've been reading up on it and seeing …

pdo persistence database-connection
How to squeeze error message out of PDO?

I can't seem to get any error message from PDO: #$dbh->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING ); try { $…

php error-handling pdo
PDO and UTF-8 special characters in PHP / MySQL?

I am using MySQL and PHP 5.3 and tried this code. $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = ''; $con = mysql_connect("localhost", "…

php pdo unicode-string
PDO lastInsertId() always return 0

I've come across with a problem. My framework was working just fine with PHP 5.3.0. I upgraded my PHP version to …

php pdo lastinsertid
MySql driver not installed error for Zend application

I am trying to get my ZEND application up on my apache server running on UNIX. Initially my host didnot …

php mysql zend-framework pdo zend-db
PDO looping throug and printing fetchAll

I'm having trouble getting my data from fetchAll to print selectively. In normal mysql I do it this way: $rs = …

php mysql database pdo fetchall
Set PDO to throw exceptions by default

I always want PDO to throw exceptions if an error occurs, as I always use PDO like so: try { $dbh = …

php mysql pdo php-ini
PHP PDO_mssql SQLSTATE[01002] Adaptive Server connection failed (severity 9)

I'm connecting to external MSSQL database for exports from PHP55/osx and I have wierd issue. code: new \PDO("dblib:…

php sql-server database pdo freetds
Fatal error: Call to undefined method Database::prepare()

I have created a separate class for database and users. Database.php class Database{ private $db; public function __construct(){ /*** mysql …

php pdo fatal-error
Is there a way to fetch associative array grouped by the values of a specified column with PDO?

For example, let's use some simple data set +---------+------+------+------------+ | name | age | sex | position | +---------+------+------+------------+ | …

php arrays pdo fetch