MySQL操作程序四十五(mscenq1_start.pl)

返回


# $t{sql} .= $t{ourref0} . '",1,1,"B","C","C","1","1","' . $t{enq2_id} . '","C")'; $t{sql} .= $t{ourref0} . '",1,1,"B","C","C","1","1","' . $t{enq2_id} . '","1")'; # $t{sql} .= $t{ourref0} . '","'. $t{owner1} . '","' . $t{ownerno1} . '","' . $t{hullnoid1} . '","B","C","C","1","1","' . $t{enq2_id} . '","C")'; $t{sql} .= $t{ourref0} . '","'. $t{owner1} . '","' . $t{ownerno1} . '","' . $t{hullnoid1} . '","B","C","C","1","1","' . $t{enq2_id} . '","1")'; ------------------------------------------------------------------------------- [error] [client 127.0.0.1] Use of uninitialized value in foreach loop entry at ./pro/mscenq1_start.pl line 346 346:for $n (1 .. $t{end1} ) { ==>增加如下部分 if ( !($t{end1}) ) { $t{end1} = 20; # 顯示項目的最大數(shù)量 $aref = $self->dbh->selectall_arrayref("SELECT id,time,ourref,ownerno,hullnoid from enq1 ORDER BY id DESC LIMIT $t{end1}"); for $row ( @$aref ) { ($t{id1},$t{time1},$t{ourref1},$t{ownerno1},$t{hullnoid1}) = @$row; $t{shipname} = $self->dbh->selectrow_array("SELECT name FROM hull_no WHERE id = $t{hullnoid1}"); $t{orderno} = $self->dbh->selectrow_array("SELECT orderno FROM order1 WHERE id = $t{id1} and orderno is not NULL"); $t{post} = $self->dbh->selectrow_array("SELECT post FROM order1 WHERE id = $t{id1} and post is not NULL"); push(@{ $t{list_id} }, $t{id1}); push(@{ $t{list_time} }, $t{time1}); push(@{ $t{list_ourref} }, $t{ourref1}); push(@{ $t{list_ownerno} }, $t{ownerno1}); push(@{ $t{list_shipname} }, $t{shipname}); push(@{ $t{list_orderno} }, $t{orderno}); if ( $t{post} ne 'NO' ) { push(@{ $t{list_post} }, $t{post}); } else { $t{post} = ''; push(@{ $t{list_post} }, $t{post}); } } }
注意:2018年為止! if ( $t{year} == 0 ) { $t{year} = 'A'; } elsif ($t{year} == 1) { $t{year} = 'B'; } elsif ($t{year} == 2) { $t{year} = 'C'; } elsif ($t{year} == 3) { $t{year} = 'D'; } elsif ($t{year} == 4) { $t{year} = 'E'; } elsif ($t{year} == 5) { $t{year} = 'F'; } elsif ($t{year} == 6) { $t{year} = 'G'; } elsif ($t{year} == 7) { $t{year} = 'H'; } elsif ($t{year} == 8) { $t{year} = 'I'; }
返回
安乡县| 马龙县| 贵阳市| 景德镇市| 措勤县| 建昌县| 濮阳县| 宜兰市| 甘南县| 日照市| 临沂市| 泸定县| 新乐市| 鹤岗市| 西平县| 宜州市| 文水县| 张家港市| 错那县| 井陉县| 油尖旺区| 华安县| 贡觉县| 海城市| 辽源市| 全椒县| 驻马店市| 于都县| 佛坪县| 平和县| 九龙坡区| 西林县| 民丰县| 东乌| 永城市| 四川省| 乌兰察布市| 南郑县| 海丰县| 绥棱县| 伽师县|