Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   My Modded TBDev (http://www.bvlist.com/showthread.php?t=10988)

fireknight 11th October 2016 10:47

OK to answer your reply to me regarding the sql_query function.

1:
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.

2:
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.

BamBam0077 28th June 2022 11:44

Quote:

Originally Posted by DND (Post 49503)
@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;                       } 

:coffee:

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

:chch: :ok:

Elena 2nd July 2022 09:16

Quote:

Originally Posted by fireknight (Post 49510)
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

Code:

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();
          $queries++;
          $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

Code:

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();
    $queries++;
    $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 )
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();

    $queries++;
    $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:
Code:

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;}

:coffee:


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

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