Re: R: Format ID field throughout

2007-03-22 Thread Mike Digital Egg
'] = 'FLW' . $result['Model'] ['id']; } return $results; // } -Messaggio originale- Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto di djiize Inviato: sabato 17 marzo 2007 19.35 A: Cake PHP Oggetto: Re: Format ID field throughout try

Re: R: Format ID field throughout

2007-03-18 Thread Mike Digital Egg
:[EMAIL PROTECTED] Per conto di djiize Inviato: sabato 17 marzo 2007 19.35 A: Cake PHP Oggetto: Re: Format ID field throughout try to play with the Model's function afterFind A quick try, in your model: function afterFind($results) { foreach ($results as $result_id = $result) { $results

Re: R: Format ID field throughout

2007-03-18 Thread Samuel DeVore
PROTECTED] Per conto di djiize Inviato: sabato 17 marzo 2007 19.35 A: Cake PHP Oggetto: Re: Format ID field throughout try to play with the Model's function afterFind A quick try, in your model: function afterFind($results) { foreach ($results as $result_id = $result

Format ID field throughout

2007-03-17 Thread Mike Digital Egg
Hi, I am looking for the best way to format an ID field every time it appears, without having to specifcally tell it to. Let me explain a bit further: I have a table called Projects, each project has an ID (numeric auto increment) so a typical output from a db call would be: ID, Project Name,

Re: Format ID field throughout

2007-03-17 Thread djiize
try to play with the Model's function afterFind A quick try, in your model: function afterFind($results) { foreach ($results as $result_id = $result) { $results[$result_id]['Model']['id'] = 'FLW' . $result['Model'] ['id']; } } On 17 mar, 13:30, Mike Digital Egg [EMAIL PROTECTED] wrote:

R: Format ID field throughout

2007-03-17 Thread Marco \(GMail\)
:[EMAIL PROTECTED] Per conto di djiize Inviato: sabato 17 marzo 2007 19.35 A: Cake PHP Oggetto: Re: Format ID field throughout try to play with the Model's function afterFind A quick try, in your model: function afterFind($results) { foreach ($results as $result_id = $result) { $results