Monday, October 4, 2010

Re: handling an update

Try with the php key function:

http://php.net/manual/en/function.key.php

On Oct 4, 5:33 pm, james <jamesliv...@googlemail.com> wrote:
> hi
>
> im trying to update some data in a table and the array that holds the
> data looks like:
>
> $this->params['form'] -
>
> Array
> (
>     [9] => 1
>     [12] => 1
>     [14] => 1
>     [15] => 0
>     [16] => 0
>     [29] => 0
>     [28] => 0
>     [27] => 0
>     [26] => 0
>     [25] => 0
>     [30] => 0
>     [31] => 0
>     [32] => 0
> )
>
> what i need to do is update the field (a tinyint) where the id equals
> the array key but im not sure how to get each array key into a
> variable for the update.
>
> hope that makes sense but im not sure it does!
>
> cheers

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: