From 1fc502a24559857965d05cd90f7b315f0f4cc75a Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 7 Jan 2023 20:17:15 +0100 Subject: [PATCH] pg test --- proj/paper/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proj/paper/index.php b/proj/paper/index.php index 1bc11cf..14fdc86 100644 --- a/proj/paper/index.php +++ b/proj/paper/index.php @@ -19,12 +19,12 @@ if (!$db) { var_dump($db); // Execute a query -$result = pg_query($db, "INSERT INTO testab (testval) VALUES ('Yolo')"); +$result = pg_query($db, "SELECT testval FROM testab"); -var_dump($result); +//var_dump($result); + +//echo pg_last_error($db); -echo pg_last_error($db); -/* if (!$result) { // query failed echo "Error: Query failed\n"; @@ -34,7 +34,7 @@ if (!$result) { echo "Name: $row[0]\n"; } } -*/ + // close the connection pg_close($db);