Top "Pdo" questions

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

PDO support for multiple queries (PDO_MYSQL, PDO_MYSQLND)

I do know that PDO does not support multiple queries getting executed in one statement. I've been Googleing and found …

php mysql pdo
PHP PDO with foreach and fetch

The following code: <?php try { $dbh = new PDO("mysql:host=$hostname;dbname=$dbname", $username, $password); echo "Connection is successful!&…

php mysql pdo foreach fetch
Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' with pdo

$db = new PDO('mysql:dbname=xnews;host=localhost;port=' . $LOCAL_DB_PORT, $LOCAL_DB_USER, $LOCAL_DB_PASS, array(…

php pdo
PDO mysql: How to know if insert was successful

I'm using PDO to insert a record (mysql and php) $stmt->bindParam(':field1', $field1, PDO::PARAM_STR); $…

php mysql database pdo
What is the difference between MySQL, MySQLi and PDO?

What is the difference between MySQL, MySQLi and PDO? Which one is the best suited to use with PHP-MySQL?

php mysql pdo mysqli
How to view query error in PDO PHP

try { $db = new PDO("mysql:host=".HOST.";dbname=".DB, USER, PW); $st = $db->prepare("SELECT * FROM c6ode"); } catch (…

php mysql pdo
php pdo: get the columns name of a table

How can I get all the column names from a table using PDO? id name age 1 Alan 35 2 Alex 52 3 Amy 15 The …

php pdo fetch
How to get the total number of rows of a GROUP BY query?

From the PDO manual: PDOStatement::rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement …

php database sqlite pdo
Getting raw SQL query string from PDO prepared statements

Is there a way to get the raw SQL string executed when calling PDOStatement::execute() on a prepared statement? For …

php sql mysql pdo pdostatement
How do I configure php to enable pdo and include mysqli on CentOS?

PHP Version 5.3.3 on CentOS (x86_64, RHEL 6) Apparently my PHP installation was configured to exclude Mysqli and disable PDO for some …

php pdo mysqli centos