First of all, you can also do that as $this->Model->find(null, 'MAX(id) as id'), which would give you $id[0]['id'] -> 34 (only 2 levels). But the reason the array shows up as [0] instead of the model name is because of how MySQL returns query results. Actual fields (like id) are associated with a particular table, whereas calculated results (like MAX(...)) aren't.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
