Incrementally use ->fields for recordsets, ->f is not supported by upstream adodb.
authorsoranzo <soranzo>
Wed, 10 Jan 2007 01:31:18 +0000 (01:31 +0000)
committersoranzo <soranzo>
Wed, 10 Jan 2007 01:31:18 +0000 (01:31 +0000)
sql.php
sqledit.php

diff --git a/sql.php b/sql.php
index 54df2429e660b229667c21dea861ac959610be45..03bd8c3c6f428c02ab6c509114256ad1aca48cd3 100644 (file)
--- a/sql.php
+++ b/sql.php
@@ -6,7 +6,7 @@
         * how many SQL statements have been strung together with semi-colons
         * @param $query The SQL query string to execute
         *
-        * $Id: sql.php,v 1.32 2005/06/16 14:40:11 chriskl Exp $
+        * $Id: sql.php,v 1.33 2007/01/10 01:31:18 soranzo Exp $
         */
 
        // Prevent timeouts on large exports (non-safe mode only)
                        // First, if rows returned, then display the results
                        if ($rs->recordCount() > 0) {
                                echo "<table>\n<tr>";
-                               foreach ($rs->f as $k => $v) {
+                               foreach ($rs->fields as $k => $v) {
                                        $finfo = $rs->fetchField($k);
                                        echo "<th class=\"data\">", $misc->printVal($finfo->name), "</th>";
                                }
                                while (!$rs->EOF) {
                                        $id = (($i % 2) == 0 ? '1' : '2');
                                        echo "<tr>\n";
-                                       foreach ($rs->f as $k => $v) {
+                                       foreach ($rs->fields as $k => $v) {
                                                $finfo = $rs->fetchField($k);
                                                echo "<td class=\"data{$id}\" nowrap=\"nowrap\">", $misc->printVal($v, $finfo->type, array('null' => true)), "</td>";
                                        }                                                       
index 877dc0adc50eb407ba363e9e73fcb647bbb28935..b583c44f5cd800df5e441c80c95095ca188688ff 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Alternative SQL editing window
         *
-        * $Id: sqledit.php,v 1.30 2006/06/17 12:57:36 xzilla Exp $
+        * $Id: sqledit.php,v 1.31 2007/01/10 01:31:18 soranzo Exp $
         */
 
        // Include application functions
@@ -62,7 +62,7 @@
                        echo ": <select name=\"database\" {$onchange}>\n";
                        
                        while (!$databases->EOF) {
-                               $dbname = $databases->f['datname'];
+                               $dbname = $databases->fields['datname'];
                                echo "<option value=\"", htmlspecialchars($dbname), "\"",
                                ((isset($_REQUEST['database']) && $dbname == $_REQUEST['database'])) ? ' selected="selected"' : '', ">",
                                        htmlspecialchars($dbname), "</option>\n";