Thread: function dbconn
View Single Post
  #7  
Old 7th May 2021, 10:03
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
Quote:
Originally Posted by budgie View Post
also this will not work on seedbox and home pc torrents On cleanups
you will get DB locks on it via mysqli it will only work on PHP 5.6 NOT 7.0 SO ON

PHP Code:
    $fields explode(":""comments:leechers:seeders");
    
$res sql_query("SELECT id, seeders, leechers, comments FROM torrents");
    while (
$row mysqli_fetch_assoc($res)) {
        
$id $row["id"];
        
$torr $torrents[$id];
        foreach (
$fields as $field) {
            if (!isset(
$torr[$field]))
                
$torr[$field] = 0;
        }
        
$update = array();
        foreach (
$fields as $field) {
            if (
$torr[$field] != $row[$field])
                
$update[] = "$field = " $torr[$field];
        }
        if (
count($update))
            
sql_query("UPDATE torrents SET " implode(","$update) . " WHERE id = $id");
    } 
If you dont already know MYSQL is deprecated in later PHP -V. As pointed out by other users in this post u need to use MYSQLI.

Good luck!
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me

Reply With Quote