Top "Pdo" questions

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

How to connect to mssql using pdo through PHP and Linux?

I'm trying to for a new PDO connection using the following code. new PDO("mssql:driver=????;Server={$serverName};Database={$databaseName}", $…

php sql-server database connection pdo
PDO/PHP - Check if row exist

I want to have a condition incase the row doesn't exist at all. $stmt = $conn->prepare('SELECT * FROM table …

php pdo row
PDO::PARAM for type decimal?

I have 2 database fields `decval` decimal(5,2) `intval` int(3) I have 2 pdo queries that update them. The one that updates the …

php mysql database pdo
What are the disadvantages of using persistent connection in PDO

In PDO, a connection can be made persistent using the PDO::ATTR_PERSISTENT attribute. According to the php manual - …

php pdo
Causes of MySQL error 2014 Cannot execute queries while other unbuffered queries are active

My server runs CentOS 6.4 with MySQL 5.1.69 installed using yum with CentOS's repos, and PHP 5.4.16 installed using yum with ius's repos. …

php mysql pdo
Get last insert id after a prepared insert with PDO

I'm using PHP PDO with PostgreSQL for a new project. Given the following function, how can I return the id …

php postgresql pdo prepared-statement
PDO + MySQL and broken UTF-8 encoding

I use the PDO library with a MySQL database in PHP, but if I insert any data encoded in UTF-8, …

php mysql pdo character-encoding
MySQL remote connection fails with "unknown authentication method"

I am trying to remotely connect to MySQL server online from my local machine, but I am getting the following …

mysql pdo database-connection remote-access
php PDO fetchAll() - while not working, foreach works

I would like to know if i'm doing fine OR fetchAll() doesn't work with WHILE. here is an exemple $db=…

php pdo foreach while-loop fetchall
PHP - Using PDO with IN clause array

I'm using PDO to execute a statement with an IN clause that uses an array for its values: $in_array = …

php mysql pdo prepared-statement in-clause