SQL-Querys funktionieren nicht...
- 
					
					
					
					
 Hallo. 
 Ich hab das Problem, dass immer wenn ich eine Query ausführen will, egal ob in PHP oder C++ oder sonstwo, die CREATE DATABASE und die CREATE TABLE anweisungen nicht funktionieren. Er kennt sie gar nicht. Weiß jemand was ich da machen kann???   
 
- 
					
					
					
					
 Was heisst "er kennt sie nicht"? Welche Fehlermeldung bekommst du denn? 
 
- 
					
					
					
					
 Vielleicht hast du keine Rechte für den CREATE-Befehl... Ansonsten wäre ne Fehlermeldung echt hilfreich (in PHP auszugeben mit 
 echo mysql_error();Bloops 
 
- 
					
					
					
					
 Also ich hab folgende Zeile da drin: $Sql="CREATE TABLE Eintraege (Index INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, Name VARCHAR(20), EMail VARCHAR(50), IP VARCHAR(15))";Und jetzt gibt er mir die Fehlermeldung: 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 'INT)' at line 1 Was soll das? 
 
- 
					
					
					
					
 heisst das vielleicht integer ? 
 
- 
					
					
					
					
 Versuche mal dies hier CREATE TABLE `Eintraege` ( `Index` INT UNSIGNED NOT NULL AUTO_INCREMENT , `Name` VARCHAR( 20 ) , `EMail` VARCHAR( 50 ) , `IP` VARCHAR( 15 ) , PRIMARY KEY ( `Index` ) );
 
- 
					
					
					
					
 1.ich könnte mir auch vorstellen , dass 'index' als name unglücklich gewählt ist. 
 versuchs mal mit 'indexx'.
 2.bzw. versuchs wirklich mal mit dem typ 'INTEGER'
 
- 
					
					
					
					
 hardy schrieb: 1.ich könnte mir auch vorstellen , dass 'index' als name unglücklich gewählt ist. 
 versuchs mal mit 'indexx'.`index` in Backsticks reicht völlig. hardy schrieb: 2.bzw. versuchs wirklich mal mit dem typ 'INTEGER' INTEGER gibts afaik in Mysql überhaupt nicht. INT ist schon ok...  
 
- 
					
					
					
					
 danke! 
 
- 
					
					
					
					
 Bloops schrieb: INTEGER gibts afaik in Mysql überhaupt nicht. INT ist schon ok... 