I am no mysql expert, I most often have index auto increment id fields
such as the example from the book.cakephp.org tutorial
CREATE TABLE posts (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(50),
body TEXT,
created DATETIME DEFAULT NULL,
modified DATETIME DEFAULT NULL
);
You may have a particular reason for not using an auto increment thats up
I would follow what the book tutorial says and put those extra fields in
- S
2008/4/29 webmaster[at]hpiracing[dot]com <[EMAIL PROTECTED]>:
>
>
> [code]
> CREATE TABLE IF NOT EXISTS `supa_supa`.`blog_posts` (
> `blog_posts_id` BIGINT(12) NOT NULL ,
> `blog_id` BIGINT(12) NOT NULL ,
> `author_id` BIGINT(12) NULL ,
> `author_type` VARCHAR(45) NULL ,
> `date_created` DATETIME NULL ,
> `date_modified` DATETIME NULL ,
> `title` VARCHAR(128) NULL ,
> `description` VARCHAR(256) NULL ,
> `header` TEXT NULL ,
> `body` TEXT NULL ,
> `footer` TEXT NULL ,
> PRIMARY KEY (`blog_posts_id`) ;
> [/code]
>
> I didn't see an auto-incrementing id field being created in this
> query... CakePHP requires this, doesn't it?
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---