Since only 1 field can be auto-inc, that’s not really the best solution.

I would suggest to update 1 field where CONDITION

In the view function add in something like:

$this->Model->updateAll( array( 'Post.view_count' => 'Post.view_count + 1'
), array( 'Post.id' => $post['Post']['id'] ) );

K

From: [email protected] [mailto:[email protected]] On Behalf
Of Zaky Katalan-Ezra
Sent: Monday, March 07, 2011 5:04 AM
To: [email protected]
Cc: Zachary Stenger
Subject: Re: Database question

Use some GUI to manage your database.
Mysql workbench is a good choice.

Check the AI column in Alter table form.
-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to