1

So, I run an online imageboard and I am updating to a newer imageboard software. Rather than manually enter the board information for each new imageboard, I wanted to just port over the fields I need from the old table to the new one, but PHPMYADMIN is giving me a mysql syntax error and I don't know what the problem is:

INSERT INTO `tryboards` (uri, title)
SELECT name, desc FROM `aasboards`;

This should move the data from the old table to the new, yes? The aasboards table has several columns I want to omit. The tryboards table contains 3 fields, the 3rd one being subtitle, which is nullable and shouldn't be needed for this query.

EDIT: the error is as follows:

Error

SQL query: Documentation

INSERT INTO tryboards ( uri, title ) SELECT name, DESC FROM aasboards

MySQL said: Documentation

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc FROM aasboards' at line 2

Community
  • 1
  • 1
user3175451
  • 163
  • 1
  • 14

1 Answers1

1

desc is a reserved word:

INSERT INTO `tryboards` (uri, title)
    SELECT name, `desc` FROM `aasboards`;
Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786