So, what are the corrections ?keep_on_dreaming wrote:The update queries are still incorrect.Code: Select all
`aseco`.`secrecs_all`
[XASECO] Sector Records
- Ant
- TM-Patrol
- Posts: 1845
- Joined: 01 Dec 2007 17:04
- Owned TM-games: TMN, TMUF, TM Wii
- Location: London, England
- Contact:
Re: [XASECO] Sector Records
My TMF Hub --- Server
- michixxx93
- wheelbarrow operator
- Posts: 15
- Joined: 10 Jul 2009 13:25
- Owned TM-games: TMUF
- Contact:
Re: [XASECO] Sector Records
This is the correct version! I've tried it several times and I always got the right result.
In this case `aseco`.`secrecs_all` and `secrecs_all` are the same, because the database `aseco` is already selected, but I'm used to write my query this way.
In this case `aseco`.`secrecs_all` and `secrecs_all` are the same, because the database `aseco` is already selected, but I'm used to write my query this way.
- Ant
- TM-Patrol
- Posts: 1845
- Joined: 01 Dec 2007 17:04
- Owned TM-games: TMN, TMUF, TM Wii
- Location: London, England
- Contact:
Re: [XASECO] Sector Records
I haven't noticed anything wrong myself either - its all working as it should do - and thats all I need to worry about 

My TMF Hub --- Server
- keep_on_dreaming
- pedestrian
- Posts: 11
- Joined: 10 May 2010 03:30
- Owned TM-games: TMUF; TMU
- Location: Germany
- Contact:
Re: [XASECO] Sector Records
But not everybody is using the default database.
There are a few other problems with this plugin:
1.) Own secrecs won't load on new challenge what causes duplicate entries in database.
2.) The secrecs sometimes aren't correctly sorted.
3.) There is no possibility to just delete 1 secrec after someone took the wrong way for example.
There are a few other problems with this plugin:
1.) Own secrecs won't load on new challenge what causes duplicate entries in database.
2.) The secrecs sometimes aren't correctly sorted.
3.) There is no possibility to just delete 1 secrec after someone took the wrong way for example.
- Ant
- TM-Patrol
- Posts: 1845
- Joined: 01 Dec 2007 17:04
- Owned TM-games: TMN, TMUF, TM Wii
- Location: London, England
- Contact:
Re: [XASECO] Sector Records
Well, I don't use the default database either - mine is named something else and not Aseco but it still seems ok. The possibility to delete 1 secrec as you say would be a good idea though I reckon.
My TMF Hub --- Server
- michixxx93
- wheelbarrow operator
- Posts: 15
- Joined: 10 Jul 2009 13:25
- Owned TM-games: TMUF
- Contact:
Re: [XASECO] Sector Records
This is called on new challenge:keep_on_dreaming wrote:1.) Own secrecs won't load on new challenge what causes duplicate entries in database.
foreach($aseco->server->players->player_list as $player)
{
load_mysql_own($challengeNow,$player->login);
}
Could you be a little more precisely? own or all records ? The order should be correct because it's sorted by sector and btw a screenshot would help too.keep_on_dreaming wrote:2.) The secrecs sometimes aren't correctly sorted.
I'll see what I can do. I think a good way would be a window with the records like the jukebox.keep_on_dreaming wrote:3.) There is no possibility to just delete 1 secrec after someone took the wrong way for example.
- keep_on_dreaming
- pedestrian
- Posts: 11
- Joined: 10 May 2010 03:30
- Owned TM-games: TMUF; TMU
- Location: Germany
- Contact:
Re: [XASECO] Sector Records
Like i told you, it isn't working.michixxx93 wrote:This is called on new challenge:keep_on_dreaming wrote:1.) Own secrecs won't load on new challenge what causes duplicate entries in database.foreach($aseco->server->players->player_list as $player)
{
load_mysql_own($challengeNow,$player->login);
}
For example:
After training a map the own secrecs are shown in the window and stored to database. When this map is running again, there aren't any own secrecs loaded, what causes a new insert query into database.
Could you be a little more precisely? own or all records ? The order should be correct because it's sorted by sector and btw a screenshot would help too.keep_on_dreaming wrote:2.) The secrecs sometimes aren't correctly sorted.
- L3cKy
- happy cruiser
- Posts: 147
- Joined: 05 Sep 2007 13:55
- Owned TM-games: TMUF
- Location: Berlin
- Contact:
Re: [XASECO] Sector Records
DB-Store Fix: // there was some problems with correct storing into the db ... now it should work correctly
chnage in plugin.bestsecs.php from line 185 this ->
into this ->
Greetings
chnage in plugin.bestsecs.php from line 185 this ->
Code: Select all
function update_mysql_all($recordTime,$sector,$challenge,$playerNick,$aseco)
{
$query = "";
if(mysql_num_rows(mysql_query("SELECT * FROM secrecs_all WHERE ChallengeID='".$challenge."' AND Sector='".$sector."' LIMIT 1;")) < 1)
{
$query = "INSERT INTO secrecs_all (ID,ChallengeID,Sector,PlayerNick,Time) VALUES ('0','".$challenge."','".$sector."','".$playerNick."','".$recordTime."');";
}
else
{
$query = "UPDATE `aseco`.`secrecs_all` SET `PlayerNick` = '".$playerNick."', `Time` = '".$recordTime."' WHERE ChallengeID='".$challenge."' AND Sector='".$sector."';";
}
mysql_query($query);
}
function update_mysql_own($recordTime,$sector,$challenge,$playerNick,$aseco)
{
$query = "";
if(mysql_num_rows(mysql_query("SELECT * FROM secrecs_own WHERE ChallengeID='".$challenge."' AND Sector='".$sector."' AND PlayerNick='".$playerNick."' LIMIT 1;")) < 1)
{
$query = "INSERT INTO `secrecs_own` (ID,ChallengeID,Sector,PlayerNick,Time) VALUES ('0','".$challenge."','".$sector."','".$playerNick."','".$recordTime."');";
}
else
{
$query = "UPDATE `aseco`.`secrecs_own` SET `PlayerNick` = '".$playerNick."', `Time` = '".$recordTime."' WHERE ChallengeID='".$challenge."' AND Sector='".$sector."';";
}
mysql_query($query);
}
Code: Select all
<?php
function update_mysql_all($recordTime,$sector,$challenge,$playerNick,$aseco)
{
if(mysql_num_rows(mysql_query("SELECT * FROM secrecs_all WHERE ChallengeID='".$challenge."' AND Sector='".$sector."' LIMIT 1;")) < 1)
{
$query = "INSERT INTO secrecs_all (ID,ChallengeID,Sector,PlayerNick,Time) VALUES ('0','".$challenge."','".$sector."','".$playerNick."','".$recordTime."');";
mysql_query($query);
}
else
{
$query = "UPDATE `secrecs_all` SET `PlayerNick` = '".$playerNick."', `Time` = '".$recordTime."' WHERE ChallengeID='".$challenge."' AND Sector='".$sector."';";
mysql_query($query);
}
}
function update_mysql_own($recordTime,$sector,$challenge,$playerNick,$aseco)
{
if(mysql_num_rows(mysql_query("SELECT * FROM secrecs_own WHERE ChallengeID='".$challenge."' AND Sector='".$sector."' AND PlayerNick='".$playerNick."' LIMIT 1;")) < 1)
{
$query = "INSERT INTO `secrecs_own` (ID,ChallengeID,Sector,PlayerNick,Time) VALUES ('0','".$challenge."','".$sector."','".$playerNick."','".$recordTime."');";
mysql_query($query);
}
else
{
$query = "UPDATE `secrecs_own` SET `PlayerNick` = '".$playerNick."', `Time` = '".$recordTime."' WHERE ChallengeID='".$challenge."' AND Sector='".$sector."';";
mysql_query($query);
}
}
?>
Last edited by L3cKy on 09 Mar 2017 20:25, edited 3 times in total.
Re: [XASECO] Sector Records
Then by definition it isn't a sector time anymore. Split time or CP time would be a suitable name.L3cKy wrote:Timefix // Now the Sectortimes shows the real time you drove at the cp instead of the time you needed from the last cp to the next one
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
- L3cKy
- happy cruiser
- Posts: 147
- Joined: 05 Sep 2007 13:55
- Owned TM-games: TMUF
- Location: Berlin
- Contact:
Re: [XASECO] Sector Records
Yes you are right ... i deleted it.Xymph wrote:Then by definition it isn't a sector time anymore. Split time or CP time would be a suitable name.L3cKy wrote:Timefix // Now the Sectortimes shows the real time you drove at the cp instead of the time you needed from the last cp to the next one