> "What does '3' mean? Let's go and look in the code - oops, I don't know how 
> to."

not only this. Suppose you need to add the #4 record - or maybe change
something on the #3.

the array datasource is, IMO, the right answer for this problem. It
allows to keep the data where it belongs, in the M of MVC. however, as
jeremy pointed out, if your data is going to live outside cakephp,
problems arise.

Sometimes, for this kind of problem, I use varchar keys, so instead of
having autoincremental ids, I have readable things. InnoDB is ok with
that, and performance in a 500Mb database is good. Don't mentioning
the code - it's SO much better to write

$data = $this->Model->find('all', array( 'conditions' =>
array( 'type_id' => 'unconfirmed' ) ) );

than 'type_id' => 1.

-- 
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