![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| 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. | |||
| Advertisements |
| | #2 | ||
| > id int(11) DEFAULT '0' NOT NULL auto_increment, .... > According to Google, DEFAULT '(0)' seems a legit instruction. What's > wrong with this? Maybe the fact that an auto_increment column cannot have a default? I mean, what are you trying to accomplish with that default value? Regards, -- Willem Bogaerts Application smith Kratz B.V. http://www.kratz.nl/ | |||
| | #3 | ||
| On Fri, 08 Jun 2007 08:49:20 +0200, Willem Bogaerts <w.bogaerts@kratz.maardanzonderditstuk.nl> wrote: >Maybe the fact that an auto_increment column cannot have a default? I >mean, what are you trying to accomplish with that default value? I'm just the messenger :-) | |||
| Featured Websites | ||||
|
![]() |
| Tags: bad, default, int11 |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| default '0' | bruno - bdf | Database | 4 | 07-01-2007 7:36 PM |
| About default stylesheets... | spaghetti | HTML | 7 | 07-01-2007 1:41 PM |
| Default PIN on 1.3.2.7 / T68i | Damian Skeeles | Bluetooth Software and Hardware | 2 | 06-17-2007 12:27 PM |
| How to change default printer? | Dean Van Praotl | Graphics in general | 2 | 06-11-2007 8:05 PM |
| DEFAULT '0' | bruno - bdf | Database | 1 | 06-10-2007 12:22 AM |
| Featured Websites | ||||
|