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

**URL:** <https://forum.kirupa.com/t/login-using-flash-mx-php-and-mysql-error-mysql/247029>\
**Category:** programming\
**Created:** [December 17, 2007, 10:11pm UTC](https://forum.kirupa.com/t/login-using-flash-mx-php-and-mysql-error-mysql/247029 "2007-12-17T22:11:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xstream](https://avatars.discourse-cdn.com/v4/letter/x/fbc32d/32.png) [@Xstream](https://forum.kirupa.com/u/Xstream)\
**Post date:** [December 17, 2007, 10:11pm UTC](https://forum.kirupa.com/t/login-using-flash-mx-php-and-mysql-error-mysql/247029/1 "2007-12-17T22:11:02Z")

</div>

Hi all,

I’ve followed this tutorial:  
[http://www.kirupa.com/developer/actionscript/authentication.htm](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:

```auto
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:

```auto

[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 🙂

Thanks in advance!

Xs.
