MySQL操作程序四十五(mscenq1_start.pl)
返回
- enq1項目生成時的修改(把輸入'C'改為輸入'1')
# $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';
}
返回
新平|
镇远县|
双辽市|
平定县|
蓬莱市|
田阳县|
东辽县|
定陶县|
乐昌市|
贡嘎县|
祥云县|
措勤县|
丘北县|
冕宁县|
色达县|
西平县|
天台县|
玉龙|
贵溪市|
苍南县|
鄂托克旗|
泊头市|
曲靖市|
宁国市|
汉中市|
辽阳市|
陆良县|
峨山|
宿松县|
景洪市|
和静县|
泰和县|
积石山|
永修县|
塔河县|
麻栗坡县|
东乡族自治县|
罗田县|
海门市|
通辽市|
潜江市|