OK, I got it. My field 'order' was renamed to 'menuorder' and it now
works. I was using a reserved word for a column!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send
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
You can get the next value like so:
$orderArray = $this-find(null, 'MAX(order) as order', null, -1);
$max = $orderArray[0]['order'];
You could put that in your model beforeSave method (or in the
controller if you preferred), to update the data to be saved. As it
doesn´t depend on user input, I
Thanks for the help AD7six.
My add method in my controller now looks like this:
http://www.cakephp.org/pastes/show/2a9169ed4fb15bc60e17dcda415ff4f9
I am not getting an errors but the value isnt being passed across to
the DB. I am not sure if I am assigning the value correctly on line 2!
Any
Hi,
You need to edit/addto/manipulate $this-data for your change to take
an effect. put a pr ($this-data); before the save so you can see what
you need to change, and if you successfully changed it.
HTH,
AD7six
--~--~-~--~~~---~--~~
You received this message
Hi again,
http://www.cakephp.org/pastes/show/b0301278a5d2c37e7e84874fcfcf102f
I am now targeting the correct container but am not sure I am searching
the correct object for information i need.
--~--~-~--~~~---~--~~
You received this message because you are