Sfoglia il codice sorgente

Merge pull request #1327 from LadyMozzarella/php-slim-fix-db-responses

PHP Slim - Turn off 'beautiful' column names
Mike Smith 10 anni fa
parent
commit
1950de492b
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      frameworks/PHP/php-slim/index.php

+ 4 - 1
frameworks/PHP/php-slim/index.php

@@ -12,7 +12,10 @@ require 'Slim/RedBean/rb.php';
 
 \Slim\Slim::registerAutoloader();
 
-R::setup('mysql:host=localhost;dbname=hello_world','benchmarkdbuser','benchmarkdbpass');
+# Turn off 'beautiful' column names (converting tables names from camelCase to snake_case).
+RedBean_OODBBean::setFlagBeautifulColumnNames(false); 
+
+R::setup('mysql:host=127.0.0.1;dbname=hello_world','benchmarkdbuser','benchmarkdbpass');
 R::freeze(true);
 
 /**