Hi, I am creating a document authoring application which exports the contents to external XML files for distribution.
The parent document DB table has an 'order' field allowing authors to specify what order the documents should be presented in prior to exporting. When a parent document is first created I need to set this 'order' field to the next highest number based on existing records (authors can change the order of existing docs from another screen). What would be the best CakePHP way of doing this? One idea was to use Ajax on the form to query the DB and return the highest 'order' value incremented by 1. However if another author is also creating a document there is the danger that both new documents would have the same 'order' number. So I guess it would be best to run this query at the time the data is posted. Any suggestions as to how best to implement this in CakePHP; and are there any usefull pre-built functions that would help? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
