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
small error
Controls ·  Search New posts · Mark unread

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

2021-11-14 02:30:34
small error when i edit torrents he sql err  looks it is here
    SQL_Query_exec("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $id");
Last edited by djlive on 2021-11-14 02:52:18
2021-11-15 11:27:22
what is the error
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)
2021-11-15 11:33:20
	Database Error in torrents-edit.php on line 152: Data truncated for column 'freeleech' at row 1. Query was: UPDATE torrents SET name = 'DJ Blyatman',descr = 'No description given.',category = 50,torrentlang = 1,banned = 'no',visible = 'yes',freeleech = '',anon = 'no' WHERE id = 8.



but if i erase this line everything work just fine
$updateset[] = "freeleech = '".$_POST["freeleech"]."'";
Last edited by djlive on 2021-11-15 12:00:44
2021-11-15 20:53:43
where are you seeing this code at?
$updateset[] = "freeleech = '".$_POST["freeleech"]."'";

if torrents-edit, it should most likely be this
$updateset[] = "freeleech = '".intval($_POST["freeleech"])."'";

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)
Last edited by MicroMonkey on 2021-11-15 20:55:30
2021-11-15 21:38:54
yep worked youre the best thank you
2021-11-15 22:54:14
cool. TTv3 github updated
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)
2021-11-16 00:13:39
Update in torrents-edit.php by dj live (Thanks) :thumb
Replace for:  
    // FreeLeech
   if ($CURUSER["edit_torrents"] == "yes")
$updateset[] = "freeleech = '".intval($_POST["freeleech"])."'"; // UPDATE TTV3 BY MicroMonkey  
       #$updateset[] = "freeleech = '".$_POST["freeleech"]."'";

Last edited by spiritblue on 2021-11-16 00:15:52
2021-11-16 22:08:56
gang, I just see that it will be to do the same for VIP, anon, visible for the addition of "intval"?  :unsure

$updateset[] = "vip = '" . intval($_POST["vip"] ? "yes" : "no") . "'";
$updateset[] = "anon = '" . intval($_POST["anon"] ? "yes" : "no") . "'";
$updateset[] = "visible = '" . intval($_POST["visible"] ? "yes" : "no") . "'";


..thank you for confirming the validation of my change  :giggle
Last edited by spiritblue on 2021-11-17 22:20:36
2021-11-16 23:41:10
they are YES or NO, so that edit will not be correct
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)
Last edited by MicroMonkey on 2021-11-17 02:01:58
2021-11-17 22:20:18
indeed it gives me lanteur to replicate, ok, I withdraw ... thank you! MicroMonkey  :thumb
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