Login Using Flash MX, PHP, and MySQL: Error MySQL

Hi all,

I’ve followed this tutorial:
http://www.kirupa.com/developer/actionscript/authentication.htm

All setup and trying to add the table in mySQL database, but i get an error.

I try to add a table using this code from the tutorial:

CREATE TABLE auth (
  userid
    int(4)
    unsigned
    zerofill
    DEFAULT '0000'
    NOT NULL
    auto_increment,
  username varchar(20),
  userpassword varchar(20),
  PRIMARY KEY (userid)
);

When i enter it in SQL i get this error:


[SIZE=3]**Error**[/SIZE]
 
**SQL query:** 
 
CREATE TABLE auth( useridint( 4 ) unsignedzerofillDEFAULT '0000' NOT NULL AUTO_INCREMENT ,
username varchar( 20 ) ,
userpassword varchar( 20 ) ,
PRIMARY KEY ( userid ) 
) 
 
**MySQL said: **[[IMG]http://www.garciajeans.info/phpmyadmin/themes/original/img/b_help.png[/IMG]](http://dev.mysql.com/doc/refman/5.0/en/error-messages-server.html) 
#1067 - Invalid default value for 'userid' 

I’m just a newbie trying to understand all this new stuff, so if a wizz could help me out here (s)he’d make me a very happy man :slight_smile:

Thanks in advance!

Xs.