Bravo List
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Old 11th October 2016, 10:47
fireknight's Avatar
fireknight fireknight is offline
Join Date: Aug 2010
Posts: 173
OK to answer your reply to me regarding the sql_query function.

I never said you used one of Bigjoos old U232 versions for your code.
The sql_query function I posted from U232 V2 will work on a code regardless of whether it uses memcach or not.
End of the day it is a simple replacement function.

I never said to use FreeTSP code, I just showed you that we had used the sql_query function from U232.
And guess what ??
FreeTSP does not use memcach !!! ( so it does work with a standard code - that throws your argument out of the window ).

If you look at the sql_query function from your code.
And compare it to the one from U232 V2.

It is 100% identical, word for word, symbol for symbol.
It is a direct copy.

The chances of you coding your own sql_query function.
And it been 100% identical to the U232 V2 sql_query function.
The odds would be impossible to calculate.

But instead of you manning up and admitting it is a copy, after my last post proves it beyond a shadow of a doubt.
You try to distract the comparison of the 2 codes.
By posting a train wreck of total gibberish.

You say you want to be taken seriously and be shown some respect on these forums.
Then it is time you did the same thing.

Last edited by fireknight; 11th October 2016 at 10:48. Reason: Correction to spelling mistakes
Reply With Quote
The Following User Says Thank You to fireknight For This Useful Post:
BamBam0077 (28th June 2022)
Old 28th June 2022, 11:44
BamBam0077's Avatar
BamBam0077 BamBam0077 is offline
Senior Member
Join Date: Jul 2013
Posts: 413
Originally Posted by DND View Post
@Napon 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
Welcome to Plutonium Support. Kick Ya Feet Up!, rElax
Reply With Quote
Old 2nd July 2022, 09:16
Elena's Avatar
Elena Elena is offline
Senior Member
Join Date: Sep 2010
Posts: 95
Originally Posted by fireknight View Post
I have to agree with DND
It is a direct copy.

Just like FreeTSP V1.0.
That is a direct copy from U232 V2 code.

Napon's My Modded TBDev

function sql_query($query) {
    global $queries, $q, $querytime, $query_stat;
           $q = isset($q) && is_array($q) ? $q : array();
           $q['query_stat']= isset($q['query_stat']) && is_array($q['query_stat']) ? $q['query_stat'] : array();
           $query_start_time  = microtime(true); // Start time
           $result = mysql_query($query);
           $query_end_time  = microtime(true); // End time
           $query_time   = ($query_end_time - $query_start_time);
           $querytime = $querytime + $query_time;
           $q['querytime']  = (isset($q['querytime']) ? $q['querytime'] : 0) + $query_time;
           $query_time  = substr($query_time, 0, 8);
           $q['query_stat'][] = array('seconds' => $query_time, 'query' => $query);
    return $result;
U232 V2

function sql_query($query) {
    global $queries, $q, $querytime, $query_stat;
      $q = isset($q) && is_array($q) ? $q : array();
      $q['query_stat']= isset($q['query_stat']) && is_array($q['query_stat']) ? $q['query_stat'] : array();
    $query_start_time  = microtime(true); // Start time
    $result            = mysql_query($query);
    $query_end_time    = microtime(true); // End time
    $query_time        = ($query_end_time - $query_start_time);
    $querytime = $querytime + $query_time;
    $q['querytime']    = (isset($q['querytime']) ? $q['querytime'] : 0) + $query_time;
    $query_time        = substr($query_time, 0, 8);
    $q['query_stat'][] = array('seconds' => $query_time, 'query' => $query);
    return $result;
FTSP( copied U232 code )
function sql_query ($querytme)
    global $queries, $qtme, $querytime, $query_stat;

    $qtme               = isset($qtme) && is_array($qtme) ? $qtme : array();
    $qtme['query_stat'] = isset($qtme['query_stat']) && is_array($qtme['query_stat']) ? $qtme['query_stat'] : array();

    $query_start_time     = microtime(true); //-- Start Time --//
    $result               = mysql_query($querytme);
    $query_end_time       = microtime(true); //-- End Time --//
    $query_time           = ($query_end_time - $query_start_time);
    $querytime            = $querytime + $query_time;
    $qtme['querytime']    = (isset($qtme['querytime']) ? $qtme['querytime'] : 0) + $query_time;
    $query_time           = substr($query_time, 0, 8);
    $qtme['query_stat'][] = array('seconds' => $query_time,
                                  'query'   => $querytme);
    return $result;
LoLi v4.1:
function sql_query($query, $detect = true){
if($detect == true){detect_sqlinjection($query);}
global $queries, $query_stat, $querytime;
$queries++;$query_start_time = timer();
$result = mysql_query($query);$query_end_time = timer();
$query_time = ($query_end_time - $query_start_time);
$querytime = $querytime + $query_time;
$query_stat[] = array("seconds" => $query_time, "query" => $query);
return $result;}
Reply With Quote

modded , tbdev , tbdev2010

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 02:27. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2022, vBulletin Solutions Inc.