Kaynağa Gözat

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

PHP Slim - Turn off 'beautiful' column names
Mike Smith 10 yıl önce
ebeveyn
işleme
1950de492b
1 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  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();
 \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);
 R::freeze(true);
 
 
 /**
 /**