0

So, yesterday I just run 2 little mysql statements and changed the table engin and charset to InnoDB and utf-8. But after that, my php script just stopped working. Today I could sucessfully repair everything, but I don't want to do that again because it costed me a lot of time and today is new years eve tho.

    working * current table
        CREATE TABLE `link` (
          `id` varchar(255) NOT NULL,
          `userid` int(11) NOT NULL,
          `action` varchar(255) NOT NULL,
          `action1` varchar(255) NOT NULL,
          `link1` varchar(255) NOT NULL,
          `action2` varchar(255) NOT NULL,
          `link2` varchar(255) NOT NULL,
          `action3` varchar(255) NOT NULL,
          `link3` varchar(255) NOT NULL,
          `action4` varchar(255) NOT NULL,
          `link4` varchar(255) NOT NULL,
          `faction` varchar(255) NOT NULL,
          `flink` varchar(255) NOT NULL,
          `clicks` int(11) NOT NULL DEFAULT '0',
          `completed` int(11) NOT NULL DEFAULT '0',
          `completed1` int(11) NOT NULL,
          `completed2` int(11) NOT NULL,
          `completed_stu` int(11) NOT NULL,
          `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
          `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
          `actionAmount` int(1) NOT NULL,
          `linkAmount` int(1) NOT NULL
        ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 

not working table

CREATE TABLE `link` (
  `id` varchar(255) NOT NULL,
  `userid` int(11) NOT NULL,
  `action` varchar(255) NOT NULL,
  `action1` varchar(255) NOT NULL,
  `link1` varchar(255) NOT NULL,
  `action2` varchar(255) NOT NULL,
  `link2` varchar(255) NOT NULL,
  `action3` varchar(255) NOT NULL,
  `link3` varchar(255) NOT NULL,
  `action4` varchar(255) NOT NULL,
  `link4` varchar(255) NOT NULL,
  `faction` varchar(255) NOT NULL,
  `flink` varchar(255) NOT NULL,
  `clicks` int(11) NOT NULL DEFAULT '0',
  `completed` int(11) NOT NULL DEFAULT '0',
  `completed1` int(11) NOT NULL,
  `completed2` int(11) NOT NULL,
  `completed_stu` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `actionAmount` int(1) NOT NULL,
  `linkAmount` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

To clear things up, the table already contains over 10.000 entries, so I don't want to create a new empty table! This is just to show you the schema of the tables.

J Daniels
  • 9
  • 4

0 Answers0