Einfaches PHP / MySQL Create Table Script

Also habe ich dieses Skript nur, um eine Tabelle in meiner Datenbank zu erstellen. Ich habe es von einem alten Skript kopiert, das gerade funktioniert. Wie kommt es, dass dieser nicht funktioniert? Jemand?

Der Fehler, den ich erhalte, ist"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 "'= varchar (20) NOT NULL, column_two = int NOT NULL auto_increment, column_thre' at line 2"

<?php

include("server_connect.php");

mysql_select_db("assignment5");

$create = "CREATE TABLE tbltable (
column_one = varchar (20) NOT NULL,
column_two = int NOT NULL auto_increment,
column_three = int NOT NULL,
column_four = varchar (15) NOT NULL,
column_five = year,
PRIMARY KEY = (column_one)
)";

$results = mysql_query($create) or die (mysql_error());

echo "The tables have been created";

?>

Antworten auf die Frage(3)

Ihre Antwort auf die Frage