0

I would like to use the database schema of Xbmc to my webapplication. You can see the schema here : http://wiki.xbmc.org/index.php?title=Database_Schema_4.0/a

In my server, I have a mysql database, so I test to convert sqlite to mysql with firefox plugin : https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/

I add the first table (2.1 Table: profile) No problem. I add the seconde table (2.2 Table: collection) I have a syntax error with FOREIGN.

[ near "FOREIGN": syntax error ]Exception Name: NS_ERROR_FAILUREException Message: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.createStatement]

I don't know the good syntax for foreign key. Somebody can help me?

Seb Gy
  • 140
  • 1
  • 5
  • 15

1 Answers1

0

It looks like there is a problem with the schema generated via the firefox plugin. You could try using SQLite Professional to export your SQLite database to MySQL. Open your database in SQLite Professional, and choose Data -> Export -> MySQL. This will create a script that you can run on your MySQL database to populate it.

Here is a promo code to get a free copy of SQLite Professional: Y6E3M4H34APR

Kyle
  • 17,317
  • 32
  • 140
  • 246