Scott25
03-05-2005, 08:06 AM
im working on the mysql database to store user information so i put in the following code
<?php
require ("connect.php");
$users = " CREATE TABLE `users` (
`username` TEXT( 15 ) NOT NULL ,
`uniqueid` INT( 20 ) NOT NULL ,
`alliance` SET NOT NULL ,
`race` SET NOT NULL ,
`credits` INT( 20 ) DEFAULT '0' NOT NULL ,
`given` INT( 20 ) DEFAULT '0' NOT NULL ,
`recieved` INT( 20 ) DEFAULT '0' NOT NULL ,
`email` TEXT( 20 ) NOT NULL ,
`password` TEXT( 10 ) NOT NULL
)";
$results1 = mysql_query($users) or die (mysql_error());
echo "Successfully created!";
?>
so i then run it to set it up but then it gives me this error
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 '( 15 ) NOT NULL , `uniqueid` INT( 20 ) NOT NULL , `alliance`
any ideas?
<?php
require ("connect.php");
$users = " CREATE TABLE `users` (
`username` TEXT( 15 ) NOT NULL ,
`uniqueid` INT( 20 ) NOT NULL ,
`alliance` SET NOT NULL ,
`race` SET NOT NULL ,
`credits` INT( 20 ) DEFAULT '0' NOT NULL ,
`given` INT( 20 ) DEFAULT '0' NOT NULL ,
`recieved` INT( 20 ) DEFAULT '0' NOT NULL ,
`email` TEXT( 20 ) NOT NULL ,
`password` TEXT( 10 ) NOT NULL
)";
$results1 = mysql_query($users) or die (mysql_error());
echo "Successfully created!";
?>
so i then run it to set it up but then it gives me this error
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 '( 15 ) NOT NULL , `uniqueid` INT( 20 ) NOT NULL , `alliance`
any ideas?
