Sebastian Becker: Hat geklappt, Danke! Lösungsweg ...

Beitrag lesen

Hallo,

Dank der eingegangenen Hinweise hat es jetzt geklappt (Lösungsweg siehe unten), Danke!

Grüße,

Sebastian

Change the Order of Columns in a Table

http://dev.mysql.com/doc/refman/5.0/en/change-column-order.html

CREATE TABLE new\_gallery (
  id int(11) NOT NULL auto_increment,
  file\_name varchar(50) default NULL,
  object\_name varchar(50) default NULL,
  description\_1 varchar(50) default NULL,
  description\_2 varchar(255) default NULL,
  metatext varchar(50) default NULL,
  object\_name\_en varchar(50) default NULL,
  description\_1\_en varchar(50) default NULL,
  description\_2\_en varchar(50) default NULL,
  metatext\_en varchar(50) default NULL,
  object\_name\_tk varchar(50) default NULL,
  description\_1\_tk varchar(50) default NULL,
  description\_2\_tk varchar(50) default NULL,
  metatext\_tk varchar(50) default NULL,
  category varchar(50) default NULL,
  object\_width int(11) default '0',
  object\_height int(11) default '0',
  object\_length int(11) default '0',
  mm int(11) default '0',
  price\_euro varchar(50) default NULL,
  sold int(11) default '0',
  made\_year int(11) default '0',
  photographer varchar(50) default NULL,
  sequence int(11) default '0',
  publish int(11) default '0',
  KEY ID (id)
) TYPE=MyISAM;

INSERT INTO new\_gallery SELECT id, file\_name, object\_name, description\_1, description\_2, metatext, object\_name\_en, description\_1\_en, description\_2\_en, metatext\_en, object\_name\_tk, description\_1\_tk, description\_2\_tk, metatext\_tk, category, object\_width, object\_height, object\_length, mm, price\_euro, sold, made\_year, photographer, sequence, publish FROM gallery;

DROP TABLE gallery;

ALTER TABLE new\_gallery RENAME gallery;