Help with a mysql code
#4

Quote:
Originally Posted by MafiaOink
Посмотреть сообщение
First off:
I really suggest you not to use getGroupColor every time, you should save it onto a variable and edit it as it goes, rather than loading it every time using mysql_query as it freezes the whole script while waiting for the query to execute.

Secondly,
you are inserting a new row in the table `Clanes` but you have not specified the `Color` value, and you didn't define a default value in the table structure so that is why it is firing an error, as the mysql server does not know which value to input,

This is how you should structure that column:
pawn Код:
`Color` int(11) NOT NULL DEFAULT '-256'
Yay! Thanks you very much already fixed with
Код:
ALTER TABLE Clanes ADD `Color` int(11) NOT NULL DEFAULT '-256'
Repped +2.
Reply


Messages In This Thread
Help with a mysql code - by Blackaslan - 25.10.2018, 03:00
Re: Help with a mysql code - by Infin1ty - 25.10.2018, 09:34
Re: Help with a mysql code - by MafiaOink - 25.10.2018, 12:49
Re: Help with a mysql code - by Blackaslan - 25.10.2018, 17:47

Forum Jump:


Users browsing this thread: 1 Guest(s)