Posted by Tom
2017-06-26
Please don't use CVPrimaryKey class. It's an integer class
XA_CLASS=>'CVPrimaryKey',If the zip code is really the primary key of the table, please don't do it. Keep it as an integer.
mysql> select zip from geocode limit 10;
+-------+
| zip |
+-------+
| 00501 |
| 00544 |
| 00601 |
| 00602 |
| 00603 |
| 00604 |
| 00605 |
| 00606 |
| 00610 |
| 00611 |
+-------+
10 rows in set (0.00 sec)
Looks like my table def is good.
$spec = array(
'zip'=>array(
XA_CLASS=>'CVPrimaryKey',
XA_CAPTION=>RSTR_ZIP,
XA_SIZE=>9,
XA_REQUIRED=>false,
XA_MAX_CHAR=>9,
XA_SB_SIZE=>9,
XA_LIST=>'(sp)(sr)(key)'
My form is dropping leading zeroes