Browse Source

fix db raw test return values, #2

ikkez 11 years ago
parent
commit
fdb468260e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      php-fatfree/index.php

+ 2 - 1
php-fatfree/index.php

@@ -38,7 +38,8 @@ $f3->route(
         $result = array();
         $result = array();
         for ($i = 0; $i < $queries; $i++) {
         for ($i = 0; $i < $queries; $i++) {
             $id = mt_rand(1, 10000);
             $id = mt_rand(1, 10000);
-            $result[] = $db->exec('SELECT randomNumber FROM World WHERE id = ?',$id,0,false);
+            $res = $db->exec('SELECT randomNumber FROM World WHERE id = ?',$id,0,false);
+            $result[] = $res[0];
         }
         }
         header("Content-type: application/json");
         header("Content-type: application/json");
         echo json_encode($single ? $result[0] : $result);
         echo json_encode($single ? $result[0] : $result);