|
#1
|
|||
|
|||
Doesn't work with mysqli! (how to fix)
Is there anyone who has go this to work with the forced use of mysqli?
|
#2
|
|||
|
|||
simple.. change all your code to mysqli
__________________
Need HELP!? I can install:
|
#3
|
|||
|
|||
OK pm me what code and all I can mysqli it for you
If you wait 2 weeks I'll be uploading my FMEDITION 18 mysqli to my github |
#4
|
|||
|
|||
Besides changing mysql_* calls to mysqli_* what are the functions that need to be updated etc. Ive seen some TBDEV mods with mysqli_* but cant seem to find any showing the updated functions related to the db like dbconn()
|
The Following User Says Thank You to Tedmorris For This Useful Post: | ||
Johnny Utah (21st November 2018)
|
#5
|
|||
|
|||
if you use standard tbdev.. this should do the trick
Code:
function dbconn($autoclean = false) { global $TBDEV; if (!@($GLOBALS["___mysqli_ston"] = mysqli_connect($TBDEV['mysql_host'], $TBDEV['mysql_user'], $TBDEV['mysql_pass']))) { 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 border='0' width='100%' 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>"); else die("Too many users. Please press the Refresh button in your browser to retry."); default: die("[" . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_errno($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false)) . "] dbconn: mysql_connect: " . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))); } } ((bool)mysqli_query($GLOBALS["___mysqli_ston"], "USE {$TBDEV['mysql_db']}")) or die('dbconn: mysql_select_db: ' . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))); userlogin(); if ($autoclean) register_shutdown_function("autoclean"); }
__________________
Need HELP!? I can install:
|
The Following User Says Thank You to DND For This Useful Post: | ||
Tedmorris (22nd November 2018)
|
#6
|
|||
|
|||
Thx DND, i use a heavy modified TBsource but that should do the trick, is there anything else that needs to be changed? And one last thing, i notice some calls are not changed in some code, how do i tell which ones to leave as mysql_* and which ones to change to mysqli_* ?
|
#7
|
|||
|
|||
Basic example:
Code:
mysql_query('SELECT username FROM users WHERE id = ' . sqlesc($user['invitedby'])); Code:
mysqli_query($GLOBALS["___mysqli_ston"], 'SELECT username FROM users WHERE id = ' . sqlesc($user['invitedby'])); same query, just a bit changed
__________________
Need HELP!? I can install:
|
The Following User Says Thank You to DND For This Useful Post: | ||
Tedmorris (22nd November 2018)
|
#8
|
||||
|
||||
Quote:
|
#9
|
|||
|
|||
No mate its not but the orignal source would be. Whats a PR?
|
#10
|
|||
|
|||
mine is on github to mysqli
|
Tags |
fix , mysqli , work |
|
|