Edit or torrent update error
Hi guys,
some idea about this error when I try to editing / updating my torrent: Code:
Database Error in torrents-edit.php on line 188: |
Whats the column definition for freeleech? It's expecting something and getting a string. I suspect it's supposed to be an int.
So, the query should probably be freeleech = 0, not freeleech = ''. |
Quote:
Row 188: SQL_Query_exec("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $id"); https://i.postimg.cc/htggTKH4/Untitled.png |
:)
Quote:
Very general would look like the code of i3on and TTCE |
Quote:
I suspect the value of $updatedset is what you posted. The column definition can be found by running, in mysql: Code:
SHOW CREATE TABLE torrents |
Quote:
This is resultate Code:
CREATE TABLE `torrents` ( |
As you can see it requires freeleech to be either 0 or 1 not and empty string.
In you code, change freeleech = '' to freeleech = 0 |
If freeleech (or other options) is not checked I have that error.
Like that: Freeleech -> unckecked = error Freeleech -> ckecked = OK Webseed -> unckecked = error Webseed -> ckecked = OK Recommended -> unckecked = error Recommended -> ckecked = OK .... .... .... |
Quote:
|
well First off lets start with what version of Torrent Trader are you working with?
fast way please show the file torrents-edit.php seems like this file is trying to enter yes no rather then 0 1 so the error needs to be traced down. |
torrent-edit
Hi to all, here comes torrent-edit.php, torrents-upload.php and function.php
Version: 2.5 PHP: 5.6.4 Apache: 2.4.39 MariaDB: 10.2.36 torrent-edit.php
Code:
|
fined
Code:
$updateset[] = "freeleech = '".$_POST["freeleech"]."'"; Code:
$updateset[] = "freeleech = " . ($_POST["freeleech"] ? '1' : '0'); Code:
$updateset[] = "webseed = '".$_POST["webseed"]."'"; Code:
$updateset[] = "webseed = " . ($_POST["webseed"] ? '1' : '0'); |
Thanks Joe and other guys
Have fixed that on my own way, don't ask how and whay but it works right now Code:
$updateset[] = "freeleech = '" . ($_POST["freeleech"] ? "1" : "0") . "'"; Code:
$updateset[] = "webseed = '" . ($_POST["webseed"] ? "1" : "0") . "'"; |
just for a future reference to whomever may read this. My torrents-upload.php has this
Quote:
Quote:
|
Quote:
So that makes your post not needed or helpful in any way! |
Ok then Mr happy. Just posted some code that I thought could be useful. Sorry for that. I wont do it again. geez this place is volatile
|
Your Post seems like your trying to make hem Look like he don't know what he is doing or posting the wrong code because your file dose not have the same code as what his has with out stating the fact that you are using a different or maybe a newer version then what he is using. What your post may have said was that maybe this was repaired in a later version and that he may want to look into upgrading.
|
ok, fair enough, but I can promise you I wasnt trying to make him look bad. Why would I do that? I was just thinking I was helping, but I guess Its not perceived that way sadly. I have done a slew of editing over the years on this script, so apparently the intval was put there by me some time ago, so its not a different version, it was apparently a problem that I must have found some time ago and was just passing some info along. But no worries, all is well :)
|
OK guys think I have to get involved in this discussion a little bit, thanks to you both, you are both right in your statement, it is true that I myself use a "modified" version of TT and it does not differ much of the original version with some things I have modified myself for my own needs.
Sometimes it is the case that some posts help and sometimes it is not in life as well. I have tested both scripts you are involved in and think you do an extremely strong job in this area and really appreciate it I have chosen one of them and think it works according to my needs Wish you all the best in further script development |
hey guys , can anyone send me the latest torrent trader source , let me see what i can do in it.
Bump: is there a version that will support php 7.4 ? |
Try this JohnHasher. Im running a modded copy of this on 7.4.3, but the base code is basically the same https://github.com/MicrosoulV3/TorrentTrader-v3
|
All times are GMT +2. The time now is 00:49. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.