Open finndefi opened 2 years ago
Remove:
`p`.`lookaddons` AS `addons`
From the SQL queries that contains it. There might be more errors, but they won't appear until addon related code is removed first.
Thanks for our response. Yes the error changed.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM
znote_auction_playerza INNER JOIN
playersp ON
za.
player_id' at line 17`
There might be a ,
symbol right before FROM
that you need to remove as well?
Else could you show the full query?
Didn't find any ,FROM Sure:
edited: I got it Znote.
As I deleted 'p.lookaddons' in 'field list'
there was a , remaining on the code above:
`p`.`looktype` AS `type`**,**
FROM `znote_auction_player` za
Thank you so much.
Another question. About refund and profit:
// If we are refunding a player back to its original owner
// silently continues to list
if ($action === 'refund') {
$zaid = (isset($_POST['zaid']) && (int)$_POST['zaid'] > 0) ? (int)$_POST['zaid'] : false;
//data_dump($_POST, false, "POST");
if ($zaid !== false) {
$time = time();
// If original account is the one trying to get it back,
// and bidding period is over,
// and its not labelled as sold
// and nobody has bid on it
$character = mysql_select_single("
SELECT `player_id`
FROM `znote_auction_player`
WHERE `id`= {$zaid}
AND `original_account_id` = {$this_account_id}
AND `time_end` <= {$time}
AND `bidder_account_id` = 0
AND `bid` = 0
AND `sold` = 0
LIMIT 1
");
When user refund his own character he can't sell it anymore. I created an account with just one character. Put it to sell, wait bid time and refund it back. Now I'm getting that message when trying to sell it again, like I don't have the requirements.
Your account does not follow the required rules to sell characters.
1. Minimum level: 1
2. Minimum already earned shop points: 1
3. Eligible characters must be offline.
I realized the character is not set as claimed in DB. Idk if thats why this is happening.
And about the profit. User who sell his character is not getting points on his account. I didn't change anything beside removing the addon part. So did I forget to configure something?
Another question. About refund and profit:
I realized the character is not set as claimed in DB. Idk if thats why this is happening.
And about the profit. User who sell his character is not getting points on his account. I didn't change anything beside removing the addon part. So did I forget to configure something?
I saw the same problem when changed the system to work on OTX 2.15(tfs 0.4).
corrected in a way here, but I can't tell if it's right. I did other tests after and did not find any problems, but idk... here we go:
look for If original account is the one trying to get it back
you will found something like in line 608
// Show character in public character list (in characterprofile.php) mysql_update(" UPDATE
znote_players
SEThide_char
= 0 WHEREplayer_id
= {$character['player_id']} LIMIT 1; ");
after ");
press enter and insert this column:
// set claimed 1, to show the character again in list mysql_update(" UPDATE
znote_auction_player
SETclaimed
= 1 WHEREid
= {$zaid} LIMIT 1; ");
All right, now every time a player withdraws for his own account, he can announce again!
auctionChar.php string(671) " SELECT
za
.id
ASzaid
, CASE WHENza
.price
>za
.bid
THENza
.price
ELSEza
.bid
END ASprice
,za
.time_begin
,za
.time_end
,p
.vocation
,p
.level
,p
.lookbody
ASbody
,p
.lookfeet
ASfeet
,p
.lookhead
AShead
,p
.looklegs
ASlegs
,p
.looktype
AStype
,p
.lookaddons
ASaddons
FROMznote_auction_player
za INNER JOINplayers
p ONza
.player_id
=p
.id
WHEREp
.account_id
= 999999 ANDza
.claimed
= 0 ANDza
.sold
= 1 ANDza
.bidder_account_id
= 888888 ORDER BYp
.level
desc " (query - SQL error) Type: select_multi (select multiple rows from database)Unknown column 'p.lookaddons' in 'field list'
admin_auction.php string(560) " SELECT
za
.id
ASzaid
,za
.price
,za
.bid
,za
.time_begin
,za
.time_end
,p
.id
ASplayer_id
,p
.name
,p
.vocation
,p
.level
,p
.lookbody
ASbody
,p
.lookfeet
ASfeet
,p
.lookhead
AShead
,p
.looklegs
ASlegs
,p
.looktype
AStype
,p
.lookaddons
ASaddons
FROMznote_auction_player
za INNER JOINplayers
p ONza
.player_id
=p
.id
WHEREp
.account_id
= 999999 ANDza
.claimed
= 0 ANDza
.sold
= 1 ORDER BYza
.time_end
desc " (query - SQL error) Type: select_multi (select multiple rows from database)Unknown column 'p.lookaddons' in 'field list'
About the addon part. My server is 7.72 so there is no addons. But I don't think that is the only problem here. What am I doing wrong here?