: Client API version – mysqli : Client API library version – pdo_mysql : Client API version mysqli : mysqli_get_client_info() PDO : $pdo->getAttribute( PDO::ATTR_CLIENT_VERSION) • include “mysqlnd” string or not 17 same as
License Exception – mysqlnd : PHP license • not need build libmysqlclient before compile PHP – mysqlnd is bundled in php source code • “highly optimized for and tightly integrated into PHP” 18
server before 4.1 – "mysqlnd cannot connect to MySQL 4.1+ using old authentication" • mysqlnd don’t read “my.cnf” – affect charset – no PDO::MYSQL_ATTR_READ_DEFAULT_FILE • Type of returning value is different – example: BIT type written by manual – It mentions later 20
prepared statement prepare COM_PREPARE SELECT age FROM user WHERE name = ? execute COM_EXECUTE bind parameter "do_aki" prepare SELECT age FROM user WHERE name = ? execute COM_QUERY SELECT age FROM user WHERE name = ‘do_aki’ 25 [default PDO settings] [Preventing SQL Injection]
prepared statement prepare COM_PREPARE SELECT age FROM user WHERE name = ? execute COM_EXECUTE bind parameter "do_aki" result set 29 (integer) prepare SELECT age FROM user WHERE name = ? execute COM_QUERY SELECT age FROM user WHERE name = ‘do_aki’ result set “29” (string) text protocol binary protocol 26