Szukaj:
PL EN ES
Polecamy



Kalendarz treningów






Alfaholicy_SimRacingPL Server
Wróć   SimRacing wyścigi online > [SLS] Simracing League System > SLS support forum > SLS English support forum

SLS Multi-classes problem

Zarejestruj się Projects Kalendarz Szukaj Dzisiejsze posty Zaznacz Wszystkie Fora jako Przeczytane

SLS English support forum main support forum read by developers. English only

Odpowiedz
LinkBack Narzędzia wątku Wygląd
stare 09-07-2017, 14:46   Post #1 (permalink)
Awatar Anthony Jans
 
Zarejestrowany: Jul 2017
Postów: 4
SLS Multi-classes problem

Hi guys,

I have a problem to setup a multi-classes in one season (GT3 series - GT4 series), all the time i'm trying to setup a second classe i have an error :



When i'm clicking on "Detail" i have this message :

Cannot write data: one of values must be unique <Details>
1062: Duplicate entry '0-108' for key 'ux_caclassesnew_idclassidseason'
INSERT INTO sls_t_car_classes (IDcarClass, ClassName, weight_racepos, weight_racepos_limit, weight_standpos, weight_firstpos_bonus, weight_start, weight_limit, IDseason) VALUES (NULL , 'GT4 Series', NULL , NULL , NULL , NULL , '0', NULL , '108');



Here you can see the other setting of this season :





Anthony Jans jest offline  

Ostatnio edytowane przez Anthony Jans : 09-07-2017 - 15:46
Odpowiedź z Cytatem
stare 10-07-2017, 23:35   Post #2 (permalink)
Member
Awatar MaXyM
 
Zarejestrowany: Aug 2004
Skąd: Praha, Czech Rep.
Postów: 30.244
Wyślij wiadomośc poprzez ICQ do MaXyM
Hello
SQL query you included (from error message) tells you are trying to add class 'GT4 Series'. This is the first strange thing I noticed since all other classes are GT3. But this is not the issue you are facing.
Probably, the problem lays in NULL value passed as IDcarClass. Seems like NULL is treated as 0 (Zero) instead of telling mysql to autoincrement IDcarClass.

Have you migrated database to new server? Or maybe your hosting upgraded mysql?

And the last question, just out of curiosity: why are you creating classes for each car model? Classes are intended to agregate cars.
MaXyM jest offline  
SLS developer :: sls.simracing.pl ::

Rating: 94355 | Skill: 7.59 | OpenRating: 0
Thrustmaster TX Racing Wheel | Logitech G25 | Hamowanie: Lewą nogą | Zmiana biegów: Sekwencja
Odpowiedź z Cytatem
stare 11-07-2017, 10:49   Post #3 (permalink)
Awatar Anthony Jans
 
Zarejestrowany: Jul 2017
Postów: 4
Hi,

First thanks for answer.

In Septembre we'll host a championship with 2 categories (GT3-GT4) but in same time on the track.

So i would like to have all in one season in the SLS and not to create 2 differents season, i think it will be more easier to manage for us.

The important thing is, the winner of each categories GT3 and GT4 need to score the same amout of points so certainly 25pnts like we will take the F1 points scale.

So i would like to have something like this (others admins has done it in the past)










So one season but two championships in same time on track, with two differents champions a the end.


I'm not good with the SQL and all things like this, but i will ask peoples who are managing this, for you the problem is about the assignment of the ID for each class inside the SQL ?
Anthony Jans jest offline  
Odpowiedź z Cytatem
stare 11-07-2017, 11:15   Post #4 (permalink)
Member
Awatar MaXyM
 
Zarejestrowany: Aug 2004
Skąd: Praha, Czech Rep.
Postów: 30.244
Wyślij wiadomośc poprzez ICQ do MaXyM
Forget my question about classes. Right now I figured out that those are not car classes but cars which have GT3 in the name of the car model.

Speaking about creating classes. Basically it looks like autoincrement doesn't work.
With each new created class, primary key should be automatically incremented and stored with new class. But the error says, that new autogenerated value is 0 (zero) which shouldn't happen. Moreover, it looks like there is already some class identified by 0 (zero) value. This is the reason why attempting to another class (with the same value) ends with duplicate error.
But main problem is, that there is no proper autoincremented value set. Instead of this zero is entered every time.

Things to check:
- version of mysql
- has mysql been upgraded recently
- does column IDcarClass of table t_carclasses have autoincrement attribute set
- what current value is set for this autoincrement (should be available in some programs like phpMyAdmin etc)

Since it was working in the past I suspect mysql upgrade (to some newer version not supported by SLS) or some migration process which screwed the db. We have to investigate it.
MaXyM jest offline  
SLS developer :: sls.simracing.pl ::

Rating: 94355 | Skill: 7.59 | OpenRating: 0
Thrustmaster TX Racing Wheel | Logitech G25 | Hamowanie: Lewą nogą | Zmiana biegów: Sekwencja
Odpowiedź z Cytatem
stare 11-07-2017, 11:40   Post #5 (permalink)
Awatar Anthony Jans
 
Zarejestrowany: Jul 2017
Postów: 4
Ok, i will try to learn more to my side with the peoples who are managing this, if there is an issue between the SLS and the SQL do you thing we'll be able to edit manually the ID of the classes in the SQL to make it work ?


I will be back when i will have some news.


Thanks for help .
Anthony Jans jest offline  
Odpowiedź z Cytatem
stare 24-07-2017, 12:34   Post #6 (permalink)
Awatar Anthony Jans
 
Zarejestrowany: Jul 2017
Postów: 4
Hi guys,

we have found a solution to have 2 classes in one season, it was not working due to the "IDcarClassOLD" who was always "0" in the SQL.



So we have edited this value and it work properly, he don't have any error when we are "parsing" the results.





I would like to thanks you for your help .
Anthony Jans jest offline  
Odpowiedź z Cytatem
Odpowiedz

Bookmarks

Tagi
multiclasses, problem, sls

Narzędzia wątku
Wygląd

Zasady Postowania
Nie możesz zakładać nowych tematów
Nie możesz pisać wiadomości
Nie możesz dodawać załączników
Nie możesz edytować swoich postów

BB Code jest Włączony
EmotikonyWłączony
[IMG] kod jest Włączony
HTML kod jest Wyłączony
Trackbacks are Włączony
Pingbacks are Włączony
Refbacks are Włączony



Czasy w strefie GMT +2. Teraz jest 21:41.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
SimRacingPL

no new posts

Logowanie
Login:
Hasło:
 Zarejestruj się!

Facebook
Administratorzy
Administracja portalu
Owner
McLaren
Senior Admin
lelu0
Summer RC Cup 2018
lelu0
Admins
SirDuncan - Historic (GiW) Admin
Moderators
Dmnick - Super Moderator
sobol - Moderator