MySQL操作程序四十六(mscenq1.pl,零件输入,输出部分)
返回
[error] [client 192.168.116.104] Use of uninitialized value in numeric eq (==) at ./pro/mscenq1.pl line 738,
738: if ( $t{enq1_ids}{$b[$n]} == 0 ) {
==>
738: if ( !($t{enq1_ids}{$b[$n]}) ) {
[error] [client 127.0.0.1] Use of uninitialized value in string eq at ./pro/mscenq1.pl line 1057
[error] [client 127.0.0.1] Use of uninitialized value in numeric eq (==) at ./pro/mscenq1.pl line 1062
1057:if ( $t{sid0} eq 'C' ) {
1062:if ( $t{sid0} == $t{sid1} )
分析:
1. $t{sid0} = $t{sids}[$n];
2. # seriesid
@{ $t{sids} } = split(/==/,$t{ts}[13]);
mysql> show columns from enq1;
+------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| time | date | YES | | NULL | |
| ourref | char(11) | YES | | NULL | |
| owner | int(11) | YES | | NULL | |
| ownerno | varchar(100) | YES | | NULL | |
| hullnoid | int(11) | YES | | NULL | |
| type1id | text | YES | | NULL | |
| partsid | text | YES | | NULL | |
| QTY | text | YES | | NULL | |
| memo | text | YES | | NULL | |
| LANGUAGEid | int(11) | YES | | NULL | |
| makerid | int(11) | YES | | NULL | |
| enq2s | text | YES | | NULL | |
| seriesid | text | YES | | NULL | |
| tmp_pname | text | YES | | NULL | |
| tmp_pcode | text | YES | | NULL | |
| tmp_pqty | text | YES | | NULL | |
+------------+--------------+------+-----+---------+----------------+
17 rows in set (0.86 sec)
mysql> show columns from main_type1;
+----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(100) | YES | | NULL | |
| series | text | YES | | NULL | |
| gname_id | int(11) | YES | | NULL | |
| maker_id | int(11) | YES | | NULL | |
| GR | text | YES | | NULL | |
| DWG | text | YES | | NULL | |
| memo | text | YES | | NULL | |
+----------+--------------+------+-----+---------+----------------+
8 rows in set (0.23 sec)
mysql> select * from main_type1 where id = 8276\G
*************************** 1. row ***************************
id: 8276
name: DY-G 00 20
series: XXXSERIES=88K1026B
gname_id: 2275
maker_id: 103
GR:
DWG: XXXDWG
memo:
1 row in set (0.00 sec)
返回