Top "Pdo" questions

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

INSERT into DB table with PDO prepare and bindParam

In simple terms can someone explain what I am doing wrong here - I am simply trying to insert into …

php pdo sqlbindparameter
extending PDO class

Below is the db connection class I came out with so far, but I am going to improve it by …

php mysql pdo extends
PHP PDO - cannot serialize or unserialize PDO instances

I need to pass a PDO connection into a cart class from a controller, function __construct($connection) { $this->cart = …

php serialization pdo shopping-cart
Why does PHP PDO get "SQLSTATE[42000] [1044] Access denied for user" when mysql command line works?

My head is bloody from how hard I've been banging it against this wall for the past several hours. :( As …

php mysql database pdo database-permissions
PDO returning error "could not find driver" with a known working DSN

I'm trying to connect to an odbc database via php's PDO class: $dsn = 'odbc:CS_HDZipCodes32bit'; $username = 'demo'; $password = …

php pdo odbc dsn
PDO and MariaDB

I've been using PDO in PHP for a while now utilizing MySQL. However, recent developments have made me think that …

php pdo mariadb
PDO associative arrays - return associative

I have this code: $dbInstance = DB_Instance::getDBO(); $statement = $dbInstance->prepare("SELECT id, name FROM language ORDER BY id"); $…

arrays pdo associative
Exception 'could not find driver' while migration in yii2

This my stack trace: Exception 'yii\db\Exception' with message 'could not find driver' in /opt/lampp/htdocs/advanced/vendor/…

php mysql pdo yii2 yii2-advanced-app
PDO fetchAll group key-value pairs into assoc array

Every now and then, I get into a situation when I have a query similar in kind to: SELECT `key`, `…

php mysql pdo
PDO fetchAll array to one dimensional

this may be a simple question but am struggling to understand how to solve it. I have a form which …

php arrays pdo