Bravo List
Register
Go Back   > Bravo List > Sourcecode > TBDev
Reply
  #11  
Old 09-10-16, 13:54
MasterMan's Avatar
MasterMan MasterMan is offline
Senior Member
 
Join Date: Jan 2012
P2P
Posts: 25
Default
Quote:
Originally Posted by son View Post
Why not update your first rar file instead off making people search for any changes or so called updates you make.

Are you serious, now your giving fireknight and joeroberts pointers, when it should be you that take note, not the other way around.

Here you go again promising a code base, will you ever learn, no body wants your headache.
totally agree with you dude...!

i had some pointers too but our coder DUDE did not bother on replying instead he makes new updates to make others who instead saying thanks for the hard work ...! WHAT DA ..... ???

anywho, thanks for all useful smart replies guys to make things better
Reply With Quote
  #12  
Old 09-10-16, 14:41
Fynnon's Avatar
Fynnon Fynnon is offline
xxx
 
Join Date: Nov 2007
P2P
Posts: 957
Default
attention

Attention



I have changed the name of this topic to My Modded tbdev to better reflect the content of this release
Just so there is no misunderstanding from now on we will have to change the names of these unofficial & modded site sources to something more descriptive for what they are





pinpointing coding mistakes is also greatly appreciated and desired in this kind of topics so i wanna thank fireknight, joe and the other guys for keeping it nice & clean. having a quality debate is in our interest
Reply With Quote
  #13  
Old 09-10-16, 18:33
Napon's Avatar
Napon Napon is offline
Senior Member
 
Join Date: Feb 2016
Posts: 71
Thumbs up
Quote:
Originally Posted by DND View Post
@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
it as not been riped from u232 at all that what you think i now its not so do not go on what you think as its wrong have a nice day
Reply With Quote
  #14  
Old 10-10-16, 07:24
fireknight's Avatar
fireknight fireknight is offline
Senior Member
 
Join Date: Aug 2010
Australia
Posts: 126
Default
Quote:
Originally Posted by Napon View Post
it as not been riped from u232 at all that what you think i now its not so do not go on what you think as its wrong have a nice day
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;
}

Last edited by fireknight; 10-10-16 at 07:26. Reason: Tidied up the code boxes
Reply With Quote
  #15  
Old 10-10-16, 12:54
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 1,989
Default
lmao not like BTManagers
PHP Code:
    function sql_query($query ''$cache_ttl 0)
    {
            global 
$TheQueryCount;
            
$TheQueryCount ++;
        if (
$query != '')
        {
            global 
$cache;
            
$this->query_result =  false;
            
$this->sql_add_num_queries($this->query_result);

            if (
$this->query_result === false)
            {
                if ((
$this->query_result = @mysqli_query($this->db_connect_id$query)) === false)
                {
                    
$this->sql_error($query);
                }
            }
        }
        else
        {
            return 
false;
        }

        return 
$this->query_result;
    } 
Reply With Quote
The Following User Says Thank You to joeroberts For This Useful Post:
iforgot (24-05-17)
  #16  
Old 10-10-16, 13:13
DND's Avatar
DND DND is online now
Support
 
Join Date: Dec 2008
Posts: 935
Default
OOP :love:
__________________
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. TBDev Support
  5. Gazelle Support Install
  6. TSSE Install Support
Reply With Quote
  #17  
Old 10-10-16, 13:27
fireknight's Avatar
fireknight fireknight is offline
Senior Member
 
Join Date: Aug 2010
Australia
Posts: 126
Default
Personally I cannot stand the query stats.
I think they are a waste of time. ( they look cool the first couple of times seeing them, then they just look crap )
I would never include them in a source release ( yes they are in FreeTSP - added by Krypto )
I would include an add on mod for integrating them into the source code in the forums, for members who wanted them.

Then the sql_query(); function would become a lot simpler.

Code:
function sql_query($query)
{
    $result = mysql_query($query);

    return $result;
}
Reply With Quote
  #18  
Old 10-10-16, 17:18
Napon's Avatar
Napon Napon is offline
Senior Member
 
Join Date: Feb 2016
Posts: 71
Thumbs up
@joe ive already done mysqli on one of my code already and in not puting a code base on for all with the mysqli on at all its like everyone else on here i can name a few who are in the thread who do not thay know who thay are and fireknight the v1 v2 will not work on this as its memcach lol and for freesp noone wants it chap and ive not took the crap from it as bigjoos look at hes old very old base case to see what you can do with it so do not call him for what he says to members chap and that is for all when members put the basecode on with mysqli i will $this-> shoot up lol

the codebase as now been update with a hnr and full croms
Reply With Quote
  #19  
Old 10-10-16, 17:40
son's Avatar
son son is offline
Senior Member
 
Join Date: Dec 2015
Posts: 32
Default
Quote:
Originally Posted by Napon View Post
@joe ive already done mysqli on one of my code already and in not puting a code base on for all with the mysqli on at all its like everyone else on here i can name a few who are in the thread who do not thay know who thay are and fireknight the v1 v2 will not work on this as its memcach lol and for freesp noone wants it chap and ive not took the crap from it as bigjoos look at hes old very old base case to see what you can do with it so do not call him for what he says to members chap and that is for all when members put the basecode on with mysqli i will $this-> shoot up lol

the codebase as now been update with a hnr and full croms


You expect to become reputable by insulting others, and other code sources, your making yourself look like a jackass
Reply With Quote
  #20  
Old 10-10-16, 18:32
thartley55's Avatar
thartley55 thartley55 is offline
Senior Member
 
Join Date: Mar 2012
P2P
Posts: 23
Default
Quote:
Originally Posted by son View Post


You expect to become reputable by insulting others, and other code sources, your making yourself look like a jackass
I don't know how you can understand his gibberish enough to determine he is insulting anyone.

Reply With Quote
Reply

Tags
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 18:38. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2017, vBulletin Solutions Inc.