I have following query:
create table bans
(
id int auto_increment primary key ,
reason int not null,
player int not null,
server int not null,
starts timestamp default current_timestamp not null,
ends DATETIME not null,
constraint bans__fk_player
foreign key (player) references players ('id'),
constraint bans__fk_server
foreign key (server) references servers ('id')
);
Which results in:
[2019-01-02 18:35:29] [42000][1064] (conn=75) 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 ''id'),
[2019-01-02 18:35:29] [42000][1064] 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 ''id'),
I just want to make 1:n relation between:
players.id
-> bans.player
and name it bans__fk_player
servers.id
-> bans.server
and name it bans__fk_server