MySQL Tabelle erstellen klappt nicht

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hi, habe wenig zeit... problem sagt die überschrift schon


    new string[128] = "DROP TABLE IF EXISTS `accounts`;";
    strcat(string, " CREATE TABLE `accounts` (");
    strcat(string, " `id` int(11) NOT NULL AUTO_INCREMENT,");
    strcat(string, " `Name` varchar(24) NOT NULL,");
    strcat(string, " `Passwort` varchar(128) NOT NULL,");
    strcat(string, " `Level` int(11) NOT NULL DEFAULT '1',");
    strcat(string, " `Geld` int(11) NOT NULL DEFAULT '0',");
    strcat(string, " `Kills` int(11) NOT NULL DEFAULT '0',");
    strcat(string, " `Tode` int(11) NOT NULL DEFAULT '0',");
    strcat(string, " `Health` float NOT NULL DEFAULT '100',");
    strcat(string, " `Adminlevel` int(11) NOT NULL DEFAULT '0',");
    strcat(string, " `Fraktion` int(11) NOT NULL DEFAULT '0',");
    strcat(string, " `Banned` int(11) NOT NULL DEFAULT '0',");
    strcat(string, " PRIMARY KEY (`id`)");
    strcat(string, " ) ENGINE=MyISAM AUTO_INCREMENT=220 DEFAULT CHARSET=latin1;");
    mysql_query(string);


    währe nett wen es jemand für mich zu einer .sql datei machen würde :)

  • Jaa... aber ich schaffe es nicht die .sql datei hochzuladen...
    ich habe es auf meine daten von script hochgeladen
    aber dan wird es nicht hochgeladen... also es kommt immer errors


    Code
    [Err] 1300 - Invalid utf8 character string: 'F\xFChrerschein'[Err] CREATE TABLE `accounts` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `Name` varchar(24) NOT NULL,  `Passwort` varchar(128) NOT NULL,  `Level` int(11) NOT NULL DEFAULT '1',  `Geld` int(11) NOT NULL DEFAULT '10000',  `Skin` int(11) NOT NULL DEFAULT '137',  `Member` int(11) NOT NULL DEFAULT '0',  `Job` float NOT NULL DEFAULT '100',  `Job Zeit` int(11) NOT NULL DEFAULT '0',  `Leader` int(11) NOT NULL DEFAULT '0',  `FrakRank` int(11) NOT NULL DEFAULT '0',  `Member` int(11) NOT NULL DEFAULT '0',  `Adminlevel` int(11) NOT NULL DEFAULT '0',  `Supporter` int(11) NOT NULL DEFAULT '0',  `Ban` int(11) NOT NULL DEFAULT '0',  `F�hrerschein` int(11) NOT NULL DEFAULT '0',  `Personalausweis` int(11) NOT NULL DEFAULT '0',  `Wantedlevel` int(11) NOT NULL DEFAULT '0',  `Krankenversicherung` int(11) NOT NULL DEFAULT '0',  `Verwarnungen` int(11) NOT NULL DEFAULT '0',  `Geschlecht` int(11) NOT NULL DEFAULT '0',  `Waffenschein` int(11) NOT NULL DEFAULT '0',  `Lunch` int(11) NOT NULL DEFAULT '0',  `Angelschein` int(11) NOT NULL DEFAULT '0',  `iPod` int(11) NOT NULL DEFAULT '0',  `Fraktionsname` int(11) NOT NULL DEFAULT '0',  `Bank` int(11) NOT NULL DEFAULT '0',  `Geburtsjahr` int(11) NOT NULL DEFAULT '0',  `Jailtime` int(11) NOT NULL DEFAULT '0',  `Wanteds` int(11) NOT NULL DEFAULT '0',  `Gestorben` int(11) NOT NULL DEFAULT '0',  `PTX` int(11) NOT NULL DEFAULT '0',  `PTY` int(11) NOT NULL DEFAULT '0',  `PTZ` int(11) NOT NULL DEFAULT '0',  `NextPayday` int(11) NOT NULL DEFAULT '0',  PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=220 DEFAULT CHARSET=latin1;[Msg] Finished - Unsuccessfully--------------------------------------------------


    ....
    ich weiss nicht wieso..
    in meiner .sql datei ist das:

    Code
    DROP TABLE IF EXISTS `accounts`;CREATE TABLE `accounts` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `Name` varchar(24) NOT NULL,  `Passwort` varchar(128) NOT NULL,  `Level` int(11) NOT NULL DEFAULT '1',  `Geld` int(11) NOT NULL DEFAULT '10000',  `Skin` int(11) NOT NULL DEFAULT '137',  `Member` int(11) NOT NULL DEFAULT '0',  `Job` float NOT NULL DEFAULT '100',  `Job Zeit` int(11) NOT NULL DEFAULT '0',  `Leader` int(11) NOT NULL DEFAULT '0',  `FrakRank` int(11) NOT NULL DEFAULT '0',  `Member` int(11) NOT NULL DEFAULT '0',  `Adminlevel` int(11) NOT NULL DEFAULT '0',  `Supporter` int(11) NOT NULL DEFAULT '0',  `Ban` int(11) NOT NULL DEFAULT '0',  `Führerschein` int(11) NOT NULL DEFAULT '0',  `Personalausweis` int(11) NOT NULL DEFAULT '0',  `Wantedlevel` int(11) NOT NULL DEFAULT '0',  `Krankenversicherung` int(11) NOT NULL DEFAULT '0',  `Verwarnungen` int(11) NOT NULL DEFAULT '0',  `Geschlecht` int(11) NOT NULL DEFAULT '0',  `Waffenschein` int(11) NOT NULL DEFAULT '0',  `Lunch` int(11) NOT NULL DEFAULT '0',  `Angelschein` int(11) NOT NULL DEFAULT '0',  `iPod` int(11) NOT NULL DEFAULT '0',  `Fraktionsname` int(11) NOT NULL DEFAULT '0',  `Bank` int(11) NOT NULL DEFAULT '0',  `Geburtsjahr` int(11) NOT NULL DEFAULT '0',  `Jailtime` int(11) NOT NULL DEFAULT '0',  `Wanteds` int(11) NOT NULL DEFAULT '0',  `Gestorben` int(11) NOT NULL DEFAULT '0',  `PTX` int(11) NOT NULL DEFAULT '0',  `PTY` int(11) NOT NULL DEFAULT '0',  `PTZ` int(11) NOT NULL DEFAULT '0',  `NextPayday` int(11) NOT NULL DEFAULT '0',  PRIMARY KEY (`id`)) ENGINE=MyISAM AUTO_INCREMENT=220 DEFAULT CHARSET=latin1;

  • Wenn du schon die tabellen über das skript erstellen willst gibt es da auch eine MySQL Log sofern man mysql_debug auf true hat bei einem anderen mysql plugin auch abweichbar
    dort werden die fehler ausgeben. Du hast weitaus mehr als 500 Zeichen einfach mal in einen großen string packen und mit strlen das ganze ausgeben lassen also die länge.

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen