MEATP<?php echo '<p>Connects to a PostgreSQL database:'; ?> <?php// Соединение, выбор базы данных$dbconn = pg_connect("host=pg.sweb.ru port=5432 dbname=moatpru_test user=moatpru_test password=*od***obe**anj*")or die('Could not connect: ' . pg_last_error());var_dump($dbconn);echo '<p>Execute a SQL query:'; $table= "Users"; // generate and execute a query $query = "SELECT id FROM $table"; $result = pg_query($connection, "SELECT users FROM $table") or die("Error in query: $query. ". pg_last_error($connection)); // get the number of rows in the resultset $rows = pg_num_rows($result); echo "There are currently $rows records in the database."; // close database connection pg_close($connection); ?> <?php echo '<p>FINISH'; ?>