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

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

2022-03-28 22:09:36
how should this line be to take the classes?
$class = $_POST['userclass'];
2022-03-28 22:31:14
V3 looks like this
$class = sqlesc($_POST["class"]);
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)
2022-03-29 02:58:57
i get this sql error:
Database Error in take-upload-bonus.php on line 40: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''= 8'' at line 1. Query was: UPDATE users SET uploaded = uploaded+1073741824 WHERE class '= 8'.

line 40 looks like this:
$res = SQL_Query_exec("UPDATE users SET uploaded = uploaded+1073741824 WHERE class $class");
2022-03-29 14:53:39
perhaps this way?
$res = SQL_Query_exec("UPDATE `users`  SET `uploaded` = `uploaded` + '1073741824' WHERE `class` = '$class'");
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 2022-03-29 14:54:19
2022-03-29 17:10:56
with your line i get this error in sql

Database Error in take-upload-bonus.php on line 34: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '''' at line 1. Query was: UPDATE `users` SET `uploaded` = `uploaded` + '1073741824' WHERE `class` = ''= 8''.
2022-03-29 18:04:43
ok solved  :P thx for help ill post the mod when its finished.
Thanks
2022-03-29 19:18:45
Cool. glad its sorted. sorry I didnt help much. I see that its adding the equal sign to the query. I really need to wear my glasses more often lol
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 2022-03-29 19:21:23
2022-03-29 19:39:01
its done with your help :)

https://torrenttrader.uk/topic?topicid=10436&page=last
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