PostgreSQLの基本構文(EC-CUBEの場合)

SQL文です。

if (!($db = pg_connect("host=localhost port=5432 dbname=".DB_NAME." user=".DB_USER." password=".DB_PASSWORD." "))) {
	die("db_connect_error");
}
$sql = "SELECT * FROM dtb_products";
$rs = pg_exec($db, $sql);
$rs = pg_query($sql);
$item4 = pg_fetch_array($rs, NULL, PGSQL_ASSOC);

コメントを残す