Hey all,

I have this in my add view's form.

Basically I have a dropdown list with the week days as they select
them it should return me an int value depending on the day, fairly
simple.

echo $form->select('weekday', array('1'=>'Sunday',
                                    '2'=>'Monday',
                                    '3'=>'Tuesday',
                                    '4'=>'Wednesday',
                                    '5'=>'Thursday',
                                    '6'=>'Friday',
                                    '7'=>'Saturday'
                                    ),null,null
                      );

Although no matter what I choose it always returns 1 in my database.
So I did a 'pr($this->data); before the save and it returns me the
correct value for weekday.

(if I choose Tuesday:)

Array
(
    [OneIvrHour] => Array
        (
            [site_id] => 11
            [program_id] => 90
            [weekday] => 3
            [start] => Array
                (
                    [month] => 04
                    [day] => 07
                    [year] => 2009
                    [hour] => 10
                    [min] => 26
                    [meridian] => am
                )

            [stop] => Array
                (
                    [month] => 04
                    [day] => 07
                    [year] => 2009
                    [hour] => 10
                    [min] => 26
                    [meridian] => am
                )

        )

)

The field in the database is: tinyint size 1

Now I would change this to see what happens, but unfortunately I don't
have the rights to manage the database.

Does Cake handle tinyint's as boolean values?  I am doing something
wrong here?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to