MySQL操作程序二十四(OWNER1专用Paymentid的修改)

返回

  1. 数据库操作
  2. 修改mscenq1_start.pl
  3. 修改选择船公司时自动改paymentid

数据库操作 mysql> select * from enq2_payment; +----+--------------------------------------------------+ | id | PAYMENT | +----+--------------------------------------------------+ | 1 | T/T At sight after recept of invoice & documents | | 2 | IN ADVANCED | | 3 | T/T Before shipment | | 4 | 50% On order, 50% after shipment | +----+--------------------------------------------------+ 4 rows in set (0.00 sec) mysql> INSERT INTO eqn2_payment (PAYMENT) VALUES('T/T 10 days after B/L date'); ERROR 1146 (42S02): Table 'cookbook.eqn2_payment' doesn't exist mysql> INSERT INTO enq2_payment (PAYMENT) VALUES('T/T 10 days after B/L date'); Query OK, 1 row affected (0.20 sec) mysql> select * from enq2_payment; +----+--------------------------------------------------+ | id | PAYMENT | +----+--------------------------------------------------+ | 1 | T/T At sight after recept of invoice & documents | | 2 | IN ADVANCED | | 3 | T/T Before shipment | | 4 | 50% On order, 50% after shipment | | 5 | T/T 10 days after B/L date | +----+--------------------------------------------------+ 5 rows in set (0.00 sec)
修改mscenq1_start.pl # 写入quo2操作 $t{sql} = "INSERT INTO quo2 ("; $t{sql} .= 'time,ORIGINid,PRICEid,PAYMENTid,money,percent0,discount0,percent,discount,price,disc0,disc,price0) VALUES('; $t{sql} .= '"' . $t{time1} . '"'; #$t{sql} .= ',"1","1","1","1","115","100","P1","D","P2","100","D0","P0")'; $t{sql} .= ',"1","1","5","1","115","100","P1","D","P2","100","D0","P0")'; # 1改为5 $t{insert} = $self->dbh->do("$t{sql}");
修改选择船公司时自动改paymentid 增加mscenq1.pl的u_header部分 } elsif ($t{item} eq 'owner' && $t{id2} != 1 ) { $t{sql} = 'UPDATE quo2 set PAYMENTid = 1 where id = '; $t{sql} .= $t{enq1_id}; $t{DO} = $self->dbh->do($t{sql}); } elsif ($t{item} eq 'owner' && $t{id2} == 1 ) { $t{sql} = 'UPDATE quo2 set PAYMENTid = 5 where id = '; $t{sql} .= $t{enq1_id}; $t{DO} = $self->dbh->do($t{sql}); }
返回