Maurits van der Schee 10 years ago
parent
commit
538c188201
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      api.php

+ 2
- 2
api.php View File

@@ -37,7 +37,7 @@ foreach ($tables as $table) {
37 37
         $fields = array();
38 38
         foreach ($result->fetch_fields() as $field) $fields[] = $field->name;
39 39
         echo json_encode($fields);
40
-        echo ',"records":';
40
+        echo ',"records":[';
41 41
         $first_row = true;
42 42
         while ($row = $result->fetch_row()) {
43 43
             if ($first_row) $first_row = false;
@@ -46,7 +46,7 @@ foreach ($tables as $table) {
46 46
         }
47 47
         $result->close();
48 48
     }
49
-    echo '}';
49
+    echo ']}';
50 50
 }
51 51
 
52 52
 if ($callback) {

Loading…
Cancel
Save