Mysql doens't load
#1

hello, I have a problem with my MOTD's once I make them ingame they aren't saving after a server restart here is a screenshot when I open the table "Misc"



Please I have tried many things..
Reply
#2

Has anyone any idea ?
Reply
#3

You must have a primary key within the database, when I make something like this, I use an ID column which I make the primary key


You can do this using either phpmyadmin or, using the following sql code, obviously putting the other fields in where needed
Код:
CREATE TABLE `SERVER_NAME`.`misc` ( `ID` INT AUTO_INCREMENT , `MOTD` VARCHAR , PRIMARY KEY (`ID`))
Reply
#4

Quote:
Originally Posted by MotherDucker
Посмотреть сообщение
You must have a primary key within the database, when I make something like this, I use an ID column which I make the primary key


You can do this using either phpmyadmin or, using the following sql code, obviously putting the other fields in where needed
Код:
CREATE TABLE `SERVER_NAME`.`misc` ( `ID` INT AUTO_INCREMENT , `MOTD` VARCHAR , PRIMARY KEY (`ID`))
Like this ?

Reply
#5

Yes that should work, however it should really be an int, so like an ID which Auto increments as primary keys cannot be NULL, that is why I always use an ID column.
Reply
#6

Quote:
Originally Posted by MotherDucker
Посмотреть сообщение
Yes, that should work.
Well it isn't working once the server is restarted the MOTD's are blank again.
Reply
#7

I edited the comment so read it again, but could you show me the actual script you're using that gets the motd and displays it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)