please help.  probably a stupid error, but i'm having a hard time
figuring out why my saveField() call does not "stick."  i'm relatively
new to this so could be a newb problem.

in lightboxes_controller i have the following lines of code...

                        $this->Lightbox->id = $id;
                        if($this->Lightbox->saveField('status', $status))
                        {
                                $this->set('worked', "worked");
                        }
                        else
                        {
                                $this->set('worked', "did not work");
                        }

                        $this->set('data', $this->Lightbox->find("Lightbox.id = 
'$id'"));

the view just prints out $worked and $data to see what happened.  from
that output i would claim success.  i get a "worked" and an array of
data that shows the modified field.  see here...



worked

Array
(
    [Lightbox] => Array
        (
            [id] => 21
            [user_id] => 1
            [name] => 264201014
            [date_saved] => 2008-02-20
            [status] => saved
        )

    [Customer] => Array
        (
            [id] => 1
            [first_name] => geordie
            [last_name] => speake
            [log_name] => gspeake
            [email] => [EMAIL PROTECTED]
            [phone] => 805xxxxxxx
            [pswd] => pass
            [is_admin] => 1
            [is_customer] => 1
            [is_photog] => 1
        )

    [LightboxImage] => Array
        (
            [0] => Array
                (
                    [id] => 29
                    [image_id] => 123
                    [lightbox_id] => 21
                    [price_id] => 10
                    [quantity] => 1
                )

        )

)

i have DEBUG = 2 and i see the following...


SELECT COUNT(id) AS count FROM `lightboxes` WHERE `id` = 21

SELECT COUNT(id) AS count FROM `lightboxes` WHERE `id` = 21

UPDATE `lightboxes` SET `status` = 'saved' WHERE `id` IN (21)

SELECT `Lightbox`.`id`, `Lightbox`.`user_id`, `Lightbox`.`name`,
`Lightbox`.`date_saved`, `Lightbox`.`status`, `Customer`.`id`,
`Customer`.`first_name`, `Customer`.`last_name`,
`Customer`.`log_name`, `Customer`.`email`, `Customer`.`phone`,
`Customer`.`pswd`, `Customer`.`is_admin`, `Customer`.`is_customer`,
`Customer`.`is_photog` FROM `lightboxes` AS `Lightbox` LEFT JOIN
`users` AS `Customer` ON (`Lightbox`.`user_id` = `Customer`.`id`)
WHERE `Lightbox`.`id` = '21' LIMIT 1

SELECT `LightboxImage`.`id`, `LightboxImage`.`image_id`,
`LightboxImage`.`lightbox_id`, `LightboxImage`.`price_id`,
`LightboxImage`.`quantity` FROM `lightbox_images` AS `LightboxImage`
WHERE `LightboxImage`.`lightbox_id` IN (21)


now for the problem...

the table has been changed, but it now shows the field i was trying to
change has been changed to the name of  page's icon (sp2.ico).
subsequent attempts to change the field give the same output in all
responses, but i always get "sp2.ico" as the text in the field.

what am i doing wrong?

hope that wasn't too wordy.  thought it better to include the code and
outputs from the start before being asked.

thanks.

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

Reply via email to