I use smallint (3) for this kind of number as it helps distinguish the
general size of the number. I dont bother over-optimizing these too
much as it causes confusion later I think. (e.g. I just let emails be
varchar 127, names be varchar 63 ) I figure I can always optimize if I
locate a performance issue. Although a "little" bit of thought is
useful initially its better not to dwell and jsut try and ocme up with
a convention.

Luke

On Aug 21, 7:18 am, alan <[EMAIL PROTECTED]> wrote:
> Spent a while trying to figure out why I couldn't save [2] as a value
> of a field that was of type >> tinyint(1)
>
> As it turns out, i just needed to change the field to >> int(1)
>
> I know this might seem a bit off topic but if others are like me -
> they will think it's a problem with cake... go digging through the API
> documentation, and start cursing at the screen...
>
> all for want of some basic MySQL field type understanding.  More of
> that at:
>
> http://dev.mysql.com/doc/refman/4.1/en/numeric-types.html
>
> { note: was using the field for a numeric status or level field.  I
> suspect someone might come across this post looking for information on
> why a status field only ever saves as 1 or 0, never as 2, 3, 4, 5,
> etc.. }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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