Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   update mysql to mysqli (http://www.bvlist.com/showthread.php?t=12253)

elvira 19th April 2020 15:16

update mysql to mysqli
 
Hello everyone,

I want to do with mysql in mysqli. I use the TS 2.5 by xam and is fully modded, when i change this i get white page what am i doing wrong. Thank you

fuctions.php

mysql

Code:

function dbconn($autoclean = false){global $mysql_host, $mysql_user, $mysql_pass, $mysql_db;if (!@mysql_pconnect($mysql_host, $mysql_user, $mysql_pass)){switch (mysql_errno()){case 1040:case 2002:if ($_SERVER[REQUEST_METHOD] == "GET")die("

The server load is very high at the moment. Retrying, please wait...

");elsedie("Too many users. Please press the Refresh button in your browser to retry.");default:die("[" . mysql_errno() . "] dbconn: mysql_pconnect: " . mysql_error());}}mysql_select_db($mysql_db)or die('dbconn: mysql_select_db: ' + mysql_error());

mysqli

Quote:

function dbconn ($autoclean = false){global $mysqli_host, $mysqli_user, $mysqli_pass, $mysqli_db;if (!@($GLOBALS["___mysqli_ston"] = mysqli_connect['mysqli_host'], ['mysqli_user'], ['mysqli_pass'], ['mysqli_db'])){switch (((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_errno($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false))){case 1040:case 2002:if ($_SERVER['REQUEST_METHOD'] == "GET"){die("

The Server Load is Very High at the moment. Retrying, please wait...

");elsedie("Too many users. Please press the Refresh button in your Browser to retry.");default:die('Unable to connect to the database [' . mysqli_connect_error() . ']');}}mysqli_query($GLOBALS["___mysqli_ston"], "USE ['mysqli_db']")) or die('db_connect: mysqli_select_db: ' + mysqli_connect_error();
include/config.php

Quote:

readconfig('DATABASE');$mysqli_host = $DATABASE['mysqli_host'];$mysqli_user = $DATABASE['mysqli_user'];$mysqli_pass = $DATABASE['mysqli_pass'];$mysqli_db = $DATABASE['mysqli_db'];

config/DATABASE

Quote:

a:4:{s:10:"mysqli_host";s:9:"localhost";s:10:"mysqli_user";s:14:"user";s:10:"mysqli_pass";s:11:"password";s:8:"mysqli_db";s:14:"phpmyadmin";}

smoky28 2nd February 2023 18:39

Msqli ts Tracker
 
It may be that this works with ts 2.5, but with 5.6 these things do not work.


All times are GMT +2. The time now is 17:51.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.