In message <[EMAIL PROTECTED]>, Gordon Stewart
<[EMAIL PROTECTED]> writes
>$query = "ALTER TABLE Events CHANGE COLUMN `EventID` int(5) NOT NULL
>AUTO_INCREMENT;";
>==============
>check the manual that corresponds to your MySQL server version for the
>right syntax to use near 'int(5) NOT NULL AUTO_INCREMENT' at line 1
>==============

I *think* that the auto-inc must be PK - that's the way I always use it:

$query = "ALTER TABLE Events, add column `added` int NOT NULL
AUTO_INCREMENT  after `otherfield`, add primary key (`added` );

-- 
Pete Clark

http://www.hotcosta.com
http://www.spanishholidaybookings.com




Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to