Aufgabe ist es, Fehler zu beseitigen. Da er bei dir als erstes auftritt, mußt du schon bissel selbst arbeiten!
Code: Alles auswählen
CREATE TABLE IF NOT EXISTS PREFIX_ACTORS ( ActorID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Name VARCHAR(50) NOT NULL, PRIMARY KEY(ActorID) )
CREATE TABLE IF NOT EXISTS PREFIX_COLLECT ( CollectID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Bezeichnung VARCHAR(50) NOT NULL, istStandard INTEGER(1) UNSIGNED NOT NULL DEFAULT 0, brauchtPrivileg INTEGER(2) UNSIGNED NOT NULL DEFAULT 1, PRIMARY KEY(CollectID) )
CREATE TABLE IF NOT EXISTS PREFIX_COVERS ( FILME_FilmID INTEGER UNSIGNED NOT NULL, Rang SMALLINT UNSIGNED NOT NULL DEFAULT 1, Appendix VARCHAR(10) NULL, Extension VARCHAR(6) NULL, hatThumbnail INTEGER(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY(FILME_FilmID, Rang), INDEX COVERS_FKIndex1(FILME_FilmID) )
CREATE TABLE IF NOT EXISTS PREFIX_DISCS ( DiscID INTEGER UNSIGNED NOT NULL, FILME_FilmID INTEGER UNSIGNED NOT NULL, USERS_UserID INTEGER UNSIGNED NOT NULL, ausgeliehenAm DATE NOT NULL DEFAULT '0000-00-00', PRIMARY KEY(DiscID, FILME_FilmID), INDEX DISCS_FKIndex1(FILME_FilmID), INDEX DISCS_FKIndex2(USERS_UserID) )
CREATE TABLE IF NOT EXISTS PREFIX_FILME ( FilmID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, COLLECT_CollectID INTEGER UNSIGNED NOT NULL, myFilmID INTEGER UNSIGNED NOT NULL, Titel VARCHAR(255) NULL, Originaltitel VARCHAR(255) NULL, Jahr INT(4) NOT NULL DEFAULT 0, Land VARCHAR(255) NULL, Laufzeit INTEGER(4) UNSIGNED NOT NULL DEFAULT 0, FSK INTEGER(2) UNSIGNED NOT NULL DEFAULT 0, FSKunbekannt INTEGER(1) UNSIGNED NOT NULL, Inhalt TEXT NULL, Bemerkung TEXT NULL, inserted DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', istTopfilm INTEGER(1) UNSIGNED NOT NULL DEFAULT 0, Webseite VARCHAR(255) NULL, brauchtPrivileg INTEGER(2) UNSIGNED NOT NULL DEFAULT 1, USERS_UserID INTEGER UNSIGNED NOT NULL, FORMATE_FormatID INTEGER UNSIGNED NOT NULL, PRIMARY KEY(FilmID), INDEX FILME_FKIndex1(USERS_UserID), INDEX FILME_FKIndex2(FORMATE_FormatID), INDEX FILME_FKIndex3(COLLECT_CollectID) )
CREATE TABLE IF NOT EXISTS PREFIX_FILME_ACTORS ( FILME_FilmID INTEGER UNSIGNED NOT NULL, ACTORS_ActorID INTEGER UNSIGNED NOT NULL, Rang SMALLINT UNSIGNED NOT NULL, PRIMARY KEY(FILME_FilmID, ACTORS_ActorID), INDEX FILME_ACTORS_FKIndex1(FILME_FilmID), INDEX FILME_ACTORS_FKIndex2(ACTORS_ActorID) )
CREATE TABLE IF NOT EXISTS PREFIX_FILME_GENRES ( FILME_FilmID INTEGER UNSIGNED NOT NULL, GENRES_GenreID INTEGER UNSIGNED NOT NULL, Rang SMALLINT UNSIGNED NULL, PRIMARY KEY(FILME_FilmID, GENRES_GenreID), INDEX FILME_GENRES_FKIndex1(FILME_FilmID), INDEX FILME_GENRES_FKIndex2(GENRES_GenreID) )
CREATE TABLE IF NOT EXISTS PREFIX_FILME_REGISSEURE ( FILME_FilmID INTEGER UNSIGNED NOT NULL, REGISSEURE_RegisseurID INTEGER UNSIGNED NOT NULL, Rang SMALLINT UNSIGNED NOT NULL, PRIMARY KEY(FILME_FilmID, REGISSEURE_RegisseurID), INDEX FILME_REGISSEURE_FKIndex1(FILME_FilmID), INDEX FILME_REGISSEURE_FKIndex2(REGISSEURE_RegisseurID) )
CREATE TABLE IF NOT EXISTS PREFIX_FILME_USERS ( FILME_FilmID INTEGER UNSIGNED NOT NULL, USERS_UserID INTEGER UNSIGNED NOT NULL, Kommentar VARCHAR(255) NULL, zeigeNamen INTEGER(1) UNSIGNED NOT NULL DEFAULT 1, istNeu INTEGER(1) UNSIGNED NOT NULL DEFAULT 0, Zeitpunkt DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', Bewertung INTEGER(2) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY(FILME_FilmID, USERS_UserID), INDEX FILME_USERS_FKIndex1(FILME_FilmID), INDEX FILME_USERS_FKIndex2(USERS_UserID) )
CREATE TABLE IF NOT EXISTS PREFIX_FORMATE ( FormatID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Bezeichnung VARCHAR(50) NULL, istStandard INTEGER(1) UNSIGNED NOT NULL DEFAULT 0, brauchtPrivileg INTEGER(2) UNSIGNED NOT NULL DEFAULT 1, PRIMARY KEY(FormatID) )
CREATE TABLE IF NOT EXISTS PREFIX_GENRES ( GenreID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Name VARCHAR(50) NOT NULL, brauchtPrivileg INTEGER(2) UNSIGNED NOT NULL DEFAULT 1, PRIMARY KEY(GenreID) )
CREATE TABLE IF NOT EXISTS PREFIX_REGISSEURE ( RegisseurID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Name VARCHAR(50) NOT NULL, PRIMARY KEY(RegisseurID) )
CREATE TABLE IF NOT EXISTS PREFIX_SETTINGS ( Variable VARCHAR(100) NOT NULL, Wert VARCHAR(255) NOT NULL, PRIMARY KEY(Variable) )
CREATE TABLE IF NOT EXISTS PREFIX_USERS ( UserID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, UserName VARCHAR(50) NOT NULL, UserRechte INTEGER(3) UNSIGNED NOT NULL DEFAULT 300, Email VARCHAR(50) NOT NULL, PWD VARCHAR(50) NOT NULL, anzLogin INTEGER UNSIGNED NOT NULL DEFAULT 0, anzFehlLogin INTEGER UNSIGNED NOT NULL DEFAULT 0, lastLogin DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', Birthday DATE NOT NULL DEFAULT '0000-00-00', FilmPrivileg INTEGER(2) UNSIGNED NOT NULL DEFAULT 1, FormatPrivileg INTEGER(2) UNSIGNED NOT NULL DEFAULT 1, GenrePrivileg INTEGER(2) UNSIGNED NOT NULL DEFAULT 1, CollectPrivileg INTEGER(2) UNSIGNED NOT NULL DEFAULT 1, getEmail INTEGER(1) UNSIGNED NOT NULL DEFAULT 0, checkChangePWD VARCHAR(40) NULL, Style VARCHAR(50) NULL, showAnzFilme INTEGER UNSIGNED NOT NULL DEFAULT 40, showSmallCovers INTEGER(2) UNSIGNED NOT NULL DEFAULT 1, PRIMARY KEY(UserID) )