View Single Post
Old 07-01-2007, 11:00 PM   #1
Gilles Ganault
 
Gilles Ganault's Avatar
 
Posts: n/a
My Photos: ()

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Bad? id int(11) DEFAULT '0'

Hello

I'm trying to install the authlib module that's required for
the open-source iOutliner web-based outliner (http://ioutliner.com),
but it fails halfway through when creating the tables:

//Bad! /* SQL Error: Invalid default value for 'id' */
$query = mysql_query("CREATE TABLE authlib_data (
id int(11) DEFAULT '0' NOT NULL auto_increment,
name text NOT NULL,
email text NOT NULL,
age int(3) DEFAULT '0' NOT NULL,
*** text NOT NULL,
school text NOT NULL,
PRIMARY KEY (id)
)");

//Bad! /* SQL Error: Invalid default value for 'id' */
$query = mysql_query("CREATE TABLE authlib_login (
id int(11) DEFAULT '0' NOT NULL auto_increment,
username text NOT NULL,
password text NOT NULL,
PRIMARY KEY (id)
)");

According to Google, DEFAULT '(0)' seems a legit instruction. What's
wrong with this?

Thank you.
  Reply With Quote
Advertisements