Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
sqlerr() has no function, here is one
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2025-01-04 23:44:35
I noticed this is in the code, so rather than edit every line in the code, just add this to backend/functions.php. This is for mysqli for TTv3, not PDO
function sqlerr($file = __FILE__, $line = __LINE__) {
   global $DBconnector; // $DBconnector  mysqli connection TTv3
   $error = $DBconnector->error;
   error_log("SQL error in $file on line $line: $error");
   die("An error occurred while executing the query. Please try again later.");
}

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2025-01-12 14:45:39
Big THANKS  đŸ‘

French ;)
===========//

#======================================#
#  FONCTION sqlerr () by MicroMonkey   #
#======================================#
function sqlerr($file = __FILE__, $line = __LINE__) {
  global $DBconnector; // $DBconnector mysqli connection TTv3
  $error = $DBconnector->error;
  error_log("Erreur SQL dans $file a la ligne $line: $error");
  die("Une erreur s\'est produite lors de l\'exĂ©cution de la requĂȘte. Veuillez rĂ©essayer ultĂ©rieurement.");
}
#===========================#
#   End FONCTION sqlerr ()  #
#===========================#

Last edited by spiritblue on 2025-01-18 17:56:59
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728