02. marts 2002 - 15:45Der er
6 kommentarer og 1 løsning
MySql foresp. fejl
Hej...
HVorfor virker denne MySql foresp. ikke:
include("db_ind.php");
mysql_query("CREATE TABLE brugere ( id int(11) NOT NULL auto_increment, brugernavn text NOT NULL, email text NOT NULL, navn text NOT NULL, point tinyint NOT NULL default '100',, point_i_spil tinyint NOT NULL default '0',, tekst text NOT NULL);");
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
fjern det ene semikolon - og så smid altid or die(mysql_error()) efter , så får du en god fejlmeddelelse
mysql_query("CREATE TABLE brugere ( id int(11) NOT NULL auto_increment, brugernavn text NOT NULL, email text NOT NULL, navn text NOT NULL, point tinyint NOT NULL default '100',, point_i_spil tinyint NOT NULL default '0',, tekst text NOT NULL)") or die(mysql_error());
mysql_query("CREATE TABLE brugere ( id int(11) NOT NULL auto_increment, brugernavn text NOT NULL, email text NOT NULL, navn text NOT NULL, point tinyint NOT NULL default '100', point_i_spil tinyint NOT NULL default '0', tekst text NOT NULL)") or die(mysql_error());
Den siger:
Incorrect table definition; There can only be one auto column and it must be defined as a key
mysql_query("CREATE TABLE brugere ( id int(11) NOT NULL auto_increment primary key, brugernavn text NOT NULL, email text NOT NULL, navn text NOT NULL, point tinyint NOT NULL default '100',, point_i_spil tinyint NOT NULL default '0',, tekst text NOT NULL)") or die(mysql_error());
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.