How can PDO not return a row which pg_query() does?
问题 I had a table with a bigserial PK, one character varying FK and a bigint FK and a unique constraint on these FKs, a character varying NOT NULL and two nullable smallints. All of this was running in a VM with Ubuntu 14.04.2 LTS, PHP 5.5.9 and PostgreSQL 9.3 and all other packages from the distribution. I did $pdo->query("SELECT * FROM table")->fetchAll(PDO::FETCH_ASSOC) and $r = pg_query($db, "SELECT * FROM table"); pg_fetch_all($r) The latter returned all rows while the former returned all