0

When installing script, I get this error message. Everything is configured as requested by the software. What could be the problem?

Setup Database Tables Connection To DB: OK! Loading XML Data: OK! Removing Dead Tables: Done! Updating Tables: Database error: Invalid SQL:

CREATE TABLE ads (
    id INT(11) NOT NULL AUTO_INCREMENT,
    title TEXT NOT NULL,
    dsub TEXT NOT NULL,
    username TEXT NOT NULL,
    class CHAR(1) NOT NULL,
    views INT(11) NOT NULL DEFAULT '0',
    views_today INT(11) NOT NULL DEFAULT '0',
    credits INT(11) NOT NULL DEFAULT '0',
    target TEXT NOT NULL DEFAULT '',
    type INT(11) NOT NULL DEFAULT '0',
    timed INT(11) NOT NULL DEFAULT '0',
    pamount DOUBLE NOT NULL DEFAULT '0',
    pref VARCHAR(25) NOT NULL,
    bgcolor VARCHAR(25) NOT NULL DEFAULT '#FFFFFF',
    forbid_retract INT(11) NOT NULL DEFAULT '0',
    active INT(1) NOT NULL DEFAULT '1',
    upgrade INT(11) NOT NULL DEFAULT '0',
    new INT(11) NOT NULL DEFAULT '1',
    daily_limit INT(11) NOT NULL DEFAULT '0',
    country VARCHAR(100) NOT NULL DEFAULT '',
    subtitle VARCHAR(167) NOT NULL DEFAULT '',
    icon TEXT NOT NULL DEFAULT 'N/A',
    subtitle_on INT(1) NOT NULL DEFAULT '0',
    icon_on INT(1) NOT NULL DEFAULT '0',
    oviews INT(11) NOT NULL DEFAULT '0',
    oviews_today INT(11) NOT NULL DEFAULT '0',
    targetban TEXT NOT NULL DEFAULT '',
    decline TEXT NOT NULL DEFAULT '0',
    hlimit INT(11) NOT NULL DEFAULT '0',
    hlimit_views INT(11) NOT NULL DEFAULT '0',
    PRIMARY KEY (id),
    KEY (class),
    KEY (pref)
)  ENGINE=INNODB;

MySQL Error: 1101 (BLOB/TEXT column 'icon' can't have a default value) Session halted.

Roshana Pitigala
  • 8,437
  • 8
  • 49
  • 80
viper
  • 1
  • Are you in strict mode on Windows? https://stackoverflow.com/questions/3466872/why-cant-a-text-column-have-a-default-value-in-mysql – rypskar Jul 12 '18 at 08:13
  • as the error message says: **MySQL Error: 1101 (BLOB/TEXT column 'icon' can't have a default value)** remove it and the query will pass – Igor Ilic Jul 12 '18 at 08:15
  • Where to remove? Database not included BLOB/TEXT column. – viper Jul 12 '18 at 08:27
  • As the error say, icon is a TEXT column. You have the line `icon TEXT NOT NULL DEFAULT 'N/A',` – rypskar Jul 12 '18 at 11:12

0 Answers0