On Dec 19, 11:04 am, Colin <co...@itnavigate.com.au> wrote:
> On Dec 19, 7:01 am, AD7six <andydawso...@gmail.com> wrote:
>
>
>
> > On Dec 18, 10:55 pm, Colin <co...@itnavigate.com.au> wrote:
>
> > > Thanks for your reply Mark.
>
> > > The logic in my app is working fine, the issue I have is that when I
> > > insert a row into my table table1_table2 all the weights get adjusted.
> > > eg:
>
> > > table1_id       table2_id        weight
> > > 1               1               1
> > > 1               2               2
> > > 1               3               3
> > > 2               4               1
> > > 2               5               2
> > > 2               6               3
>
> > > Now if I insert
> > > 1               7               2
>
> > > I get
>
> > > table1_id       table2_id        weight
> > > 1               1               1
> > > 1               2               3
> > > 1               3               4
> > > 2               4               2
> > > 2               5               3
> > > 2               6               4
> > > 1               7               2
>
> > > Note, all the weights have incremented, but I only want the weights
> > > for table1_id == 1 toincrement.
>
> > > any thoughts?
>
> > There's nothing in cake that would do that so the code that you wrote
> > is wrong ;)
>
> That's why I couldn't find it in any documentation. :-)
>
> How can I see what SQL is being generated from an AJAX request?

Oppss...
Replacing
Configure::write('debug', 0);
with
Configure::write('debug', 2);

helps with the last.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to