Re: [DB] Suggestion for field types
| From: | Alan Knowles | Date: | Mon, 12 Jan 2004 07:56:32 +0000 |
| Subject: | Re: [DB] Suggestion for field types | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24989@lists.php.net to get a copy of this message | ||
I had a look through this.. strlen is not exactly simple to calculate on some types.. - (espicially floats)
- length=4,
- string_len=strlen(8^4)+1
- unsigned = true|false
- zerofill = true|false
- max = ....
- min = ....
- fixed_len = false (eg. CHAR will be true/VARCHAR false..)
- chartype = binary | unicode | ascii
maybe
$db->tableInfo('sometable',DB_TABLEINFO_EXTENDED);
could
a) add extra table information
b) do some complex calcs for min/max, str_len etc.
Regards
Alan
Peter wrote:
Alan Knowles wrote:-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comThis is what it would look like in the mysql driver...Looks good. What does everyone think about differentiating displaylength vs length? Some systems return eg. the number of bytes needed to store a date/integer as the 'length'. This is not very useful when trying to format data for display/edit. Kind regards, Peter