I am trying to create a user's table but got the following error. What is it that is wrong? Also I'm new to mysql, what is the difference between binary and unsigned? Thanks for the help
CREATE TABLE `tblUsers` (`UserID` MEDIUMINT(7) BINARY NOT NULL AUTO_INCREMENT, `FirstName` TINYTEXT(25) UNSIGNED NOT NULL, `LastName` TINYTEXT(30) UNSIGNED NOT NULL, `Email` TINYTEXT(40) UNSIGNED NOT NULL, `Street` TINYTEXT(40) UNSIGNED NOT NULL, `City` TINYTEXT(25) UNSIGNED DEFAULT \'Saskatoon\' NOT NULL, `PostalCode` TINYTEXT(6) UNSIGNED NOT NULL, `Province` TINYTEXT(3) UNSIGNED DEFAULT \'SK\' NOT NULL, `Phone` TINYTEXT(10) UNSIGNED NOT NULL, `Password` TINYTEXT(10) UNSIGNED NOT NULL, `ReferredBy` MEDIUMINT(7) BINARY NOT NULL , PRIMARY KEY (`UserID`), INDEX (`UserID`, `Email`, `Password`, `ReferredBy`))
MySQL said:
You have an error in your SQL syntax near 'BINARY NOT NULL AUTO_INCREMENT, `FirstName` TINYTEXT(25) UNSIGNED NOT NULL, `Las' at line 1
Back
CREATE TABLE `tblUsers` (`UserID` MEDIUMINT(7) BINARY NOT NULL AUTO_INCREMENT, `FirstName` TINYTEXT(25) UNSIGNED NOT NULL, `LastName` TINYTEXT(30) UNSIGNED NOT NULL, `Email` TINYTEXT(40) UNSIGNED NOT NULL, `Street` TINYTEXT(40) UNSIGNED NOT NULL, `City` TINYTEXT(25) UNSIGNED DEFAULT \'Saskatoon\' NOT NULL, `PostalCode` TINYTEXT(6) UNSIGNED NOT NULL, `Province` TINYTEXT(3) UNSIGNED DEFAULT \'SK\' NOT NULL, `Phone` TINYTEXT(10) UNSIGNED NOT NULL, `Password` TINYTEXT(10) UNSIGNED NOT NULL, `ReferredBy` MEDIUMINT(7) BINARY NOT NULL , PRIMARY KEY (`UserID`), INDEX (`UserID`, `Email`, `Password`, `ReferredBy`))
MySQL said:
You have an error in your SQL syntax near 'BINARY NOT NULL AUTO_INCREMENT, `FirstName` TINYTEXT(25) UNSIGNED NOT NULL, `Las' at line 1
Back