PHP/FI Version 2.0




Пример 1



Пример 1

<? $conn = pg_Connect("localhost", "5432", "", "", "mydb"); if (!$conn) { echo "An error occured.\n"; exit; } $result = pg_Exec($conn, "select * from table1"); if (!$result) { echo "An error occured.\n"; exit; } $num = pg_NumRows($result); $i = 0; while ($i < $num) { echo "name: "; echo pg_Result($result, $i, "name"); echo " age: "; echo pg_Result($result, $i, "age"); echo "<BR>"; $i++; } pg_FreeResult($result); pg_Close($conn); >









Начало  Назад  Вперед


Книжный магазин