Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
  #1  
Old 19th April 2020, 15:16
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
Default 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("<html><head><meta http-equiv=refresh content="5 $_SERVER[REQUEST_URI]"></head><body><table border=0 width=700 height=100%><tr><td><h3 align=center>The server load is very high at the moment. Retrying, please wait...</h3></td></tr></table></body></html>");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("<html><head><meta http-equiv='refresh' content='5 $_SERVER['REQUEST_URI']'></head><body><table width='100%' height='100%' border='0'><tr><td><h3 align='center'>The Server Load is Very High at the moment. Retrying, please wait...</h3></td></tr></table></body></html>");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:"mysq li_user";s:14:"user";s:10:"mysqli_pass";s:11:"pass word";s:8:"mysqli_db";s:14:"phpmyadmin";}

Last edited by elvira; 19th April 2020 at 20:13.
Reply With Quote
  #2  
Old 2nd February 2023, 18:39
smoky28's Avatar
smoky28 smoky28 is offline
Senior Member
 
Join Date: Aug 2010
Hungary
Posts: 82
Default Msqli ts Tracker
It may be that this works with ts 2.5, but with 5.6 these things do not work.
__________________
Sky-Tech Developer Team Hungary

Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 23:57. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.