Thread: My Modded TBDev
View Single Post
  #10  
Old 9th October 2016, 13:05
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
@Napon
1.you realize that sql = mysql ? its just called sql because it is easier
2. sql_query as it is in u-232, and you ripped the code from there, it is used because they made a function called sql_query which does what mysqli is supposed to do and also because they have another function that show some stats used by mysql server
instead of mysqli_query they have sql_query just because of that function

PHP Code:
function mysql_fetch_all($query$default_value = Array())                       {                           $r = @sql_query($query);                           $result = Array();                           if ($err = ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res mysqli_connect_error()) ? $___mysqli_res false)))return $err;                           if (@mysqli_num_rows($r))                               while ($row mysqli_fetch_array($r))$result[] = $row;                           if (count($result) == 0)                               return $default_value;                           return $result;                       } 
PHP Code:
function sql_query($query)                       {                           global $query_stat;                           $query_start_time microtime(true); // Start time                           $result = mysqli_query($GLOBALS["___mysqli_ston"], $query);                           $query_end_time = microtime(true); // End time                           $querytime = ($query_end_time - $query_start_time);                           $query_stat[] = array(                               'seconds' => number_format($query_end_time - $query_start_time, 6) ,                               'query' => $query                           );                           return $result;                       } 


Mysqli is not such a huge thing, i dunno what ya keep blabbering about. There are a lot of converters which will convert simple mysql code into mysqli
If you want to blabber about something just do what joeroberts and I did which is to use PDO
I dont care, really, about anything you do, but at least make it right
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
The Following User Says Thank You to DND For This Useful Post:
BamBam0077 (28th June 2022)