X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdb%2Fconnect_db.inc;h=147f4a5f7972ae3d7d48ae2247f54955f6a89fa9;hb=7e8df3a179c05c51085349e139aac9ce88b9378d;hp=e899eac786553a8d1abcb7036c3809d246111855;hpb=f911dbdc3b4be63c51c25cdf98cc0b7c2e54dffb;p=fa-stable.git diff --git a/includes/db/connect_db.inc b/includes/db/connect_db.inc index e899eac7..147f4a5f 100644 --- a/includes/db/connect_db.inc +++ b/includes/db/connect_db.inc @@ -10,12 +10,12 @@ See the License here . ***********************************************************************/ //$path_to_root=".."; +define('MAX_DEADLOCK_RETRY', 3); - -if (strncmp(phpversion(), "5.4", 3) >= 0) // mysql_... functions deprecated from php 5.5 +if (function_exists('mysqli_connect')) include_once("connect_db_mysqli.inc"); -else - include_once("connect_db_mysql.inc"); +else + include_once("connect_db_mysql.inc"); // use deprecated mysql_* API as fallback on old servers function db_get_version() { @@ -90,7 +90,7 @@ function get_mysql_collation($lang=null) 'it' => 'roman', ); - return 'utf8_'.(isset($db_collation[$lang]) ? $db_collation[$lang] : 'general').'_ci'; + return 'utf8_'.(isset($db_collation[$lang]) ? $db_collation[$lang] : 'unicode').'_ci'; } /* @@ -109,12 +109,19 @@ function db_fixed() /* Check database default charset. */ -function db_get_charset() +function db_get_default_charset() { $result = db_query("SELECT @@character_set_database"); $var = db_fetch($result); return $var[0]; } - -?> \ No newline at end of file +/* + SQL db profiling stub +*/ +if (!function_exists('db_profile')) +{ + function db_profile($sql=false) + { + } +} \ No newline at end of file