input line too long (after substitutions)
#8

Most of those values are just being inserted as static default values, why not set up a default value in the MySQL table so that it does it automatically? Then you don't have to insert those values everytime you add a new row to your table. If you're using a MySQL manager such as Navicat, then you can simply set a default value in there when you're creating/editing the table.

When you're creating the table using a query, here is an example query on how to set default values for columns:

pawn Code:
CREATE TABLE example_default_now (
  id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
  created INT DEFAULT 0
  string VARCHAR(10) DEFAULT 'empty'
);
Hope that helps

You can also simply use "NOT NULL" to make it so that the field can never be null, which will result in the field being empty should no value be specified when the row is being created.
Reply


Messages In This Thread
input line too long (after substitutions) - by Linus- - 30.08.2011, 13:14
Re: input line too long (after substitutions) - by TTJJ - 30.08.2011, 13:18
Re: input line too long (after substitutions) - by Jochemd - 30.08.2011, 13:18
Re: input line too long (after substitutions) - by [MWR]Blood - 30.08.2011, 13:18
Re: input line too long (after substitutions) - by AndreT - 30.08.2011, 13:20
Re: input line too long (after substitutions) - by Linus- - 30.08.2011, 13:20
Re: input line too long (after substitutions) - by Jochemd - 30.08.2011, 13:22
Re: input line too long (after substitutions) - by JaTochNietDan - 30.08.2011, 13:25

Forum Jump:


Users browsing this thread: 4 Guest(s)