Steve Ellenoff wrote: > MySQL numeric fields work very different than they do in VFP, and I > found this very confusing at first (still do actually as old habits die > hard).. > > Unlike VFP, for numeric fields, the field's size (ie the maximum > number allowed in the field) is dictated only by the type you choose, > ie, tinyint, int, etc.. > > TINYINT cannot except any value > 255 in it's field for UNISGNED and > 127 for SIGNED. > > There's no concept of # of digits it can hold. I find this a bit > confusing honestly, and prefer to think in VFP terms, but maybe > that's just my habits again.. > > The (x) part, ie TINYINT(2) for example is an optional display size > that is used mostly in conjunction with the zero fill keyword. > > Thus: > TINYINT (2) ZEROFILL > > for values, 1,3,9,10,20,127 will appear as: > > 01 > 03 > 09 > 10 > 20 > 127 > > TINYINT(3) ZEROFILL > 001 > 003 > 009 > 010 > 020 > 127 > > I'm not quite sure how it relates when not used in conjunction with > the ZEROFILL descriptor. > > Hope this helps clarify for you. >
Thanks, Steve! That helps me realize that I can't screw myself with the (M) value in TINYINT(M) since I'm not caring about the display of the value from the DB (as my UI will take care of that). For those of you who didn't see it yet, Steve is a speaker listed on the FoxForward website for using MySQL with VFP! http://foxforward.net/session.php?topic=84 -- Michael J. Babcock, MCP MB Software Solutions, LLC http://mbsoftwaresolutions.com http://fabmate.com "Work smarter, not harder, with MBSS custom software solutions!" _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

