Clear the session arrays before populating them.
authorDave Page <dpage@developer.pgadmin.org>
Tue, 26 Aug 2008 21:44:11 +0000 (22:44 +0100)
committerDave Page <dpage@developer.pgadmin.org>
Tue, 26 Aug 2008 21:44:11 +0000 (22:44 +0100)
results.php

index 4815a0bdc429a2d0f12bb2fe9e2fe23bacfc02f8..fed60b2bb7c7f67594ccbc90b85e0074f0e47934 100644 (file)
@@ -45,12 +45,14 @@ if ($res === false)
 // Start a session to store the results in
 session_start();
 
-$message = "Rows: " . pg_affected_rows($res);
-
 $list = "";
 $divs = "";
 $rownum = 0;
 
+// Initialise the arrays to clear any old data
+$_SESSION['columns'] = array();
+$_SESSION['rows'] = array();
+
 // Store metadata for future use
 $_SESSION['column_count'] = pg_num_fields($res);
 $_SESSION['actual_rows'] = pg_num_rows($res);