一些SQL操作语句(8),parts_nu追加单位,enq2_price追加

返回
mysql> INSERT parts_nu (parts_Unit) VALUES('TABE'); Query OK, 1 row affected (0.06 sec) mysql> select * from parts_nu; +----+------------+ | id | parts_Unit | +----+------------+ | 1 | PCS | | 2 | SET | | 3 | BOX | | 4 | ROLL | | 5 | PAIR | | 6 | CAN | | 7 | DOZ | | 8 | KGS | | 9 | MTR | | 10 | SHT | | 11 | TUBE | | 12 | PKT | | 13 | TIN | | 14 | BTL | | 15 | BAG | | 16 | COIL | | 17 | LTR | | 18 | CASE | | 19 | TABE | +----+------------+ 19 rows in set (0.00 sec) ============================================================ mysql> INSERT parts_nu (parts_Unit) VALUES('CASE'); Query OK, 1 row affected (0.20 sec) mysql> select * from parts_nu; +----+------------+ | id | parts_Unit | +----+------------+ | 1 | PCS | | 2 | SET | | 3 | BOX | | 4 | ROLL | | 5 | PAIR | | 6 | CAN | | 7 | DOZ | | 8 | KGS | | 9 | MTR | | 10 | SHT | | 11 | TUBE | | 12 | PKT | | 13 | TIN | | 14 | BTL | | 15 | BAG | | 16 | COIL | | 17 | LTR | | 18 | CASE | +----+------------+ 18 rows in set (0.00 sec) mysql> INSERT parts_nu (parts_Unit) VALUES('LTR'); Query OK, 1 row affected (0.06 sec) mysql> select * from parts_nu; +----+------------+ | id | parts_Unit | +----+------------+ | 1 | PCS | | 2 | SET | | 3 | BOX | | 4 | ROLL | | 5 | PAIR | | 6 | CAN | | 7 | DOZ | | 8 | KGS | | 9 | MTR | | 10 | SHT | | 11 | TUBE | | 12 | PKT | | 13 | TIN | | 14 | BTL | | 15 | BAG | | 16 | COIL | | 17 | LTR | +----+------------+ 17 rows in set (0.00 sec) mysql> INSERT parts_nu (parts_Unit) VALUES('TIN'); Query OK, 1 row affected (0.08 sec) mysql> INSERT parts_nu (parts_Unit) VALUES('BTL'); Query OK, 1 row affected (0.09 sec) mysql> INSERT parts_nu (parts_Unit) VALUES('BAG'); Query OK, 1 row affected (0.03 sec) mysql> INSERT parts_nu (parts_Unit) VALUES('COIL'); Query OK, 1 row affected (0.06 sec) mysql> select * from parts_nu; +----+------------+ | id | parts_Unit | +----+------------+ | 1 | PCS | | 2 | SET | | 3 | BOX | | 4 | ROLL | | 5 | PAIR | | 6 | CAN | | 7 | DOZ | | 8 | KGS | | 9 | MTR | | 10 | SHT | | 11 | TUBE | | 12 | PKT | | 13 | TIN | | 14 | BTL | | 15 | BAG | | 16 | COIL | +----+------------+ 16 rows in set (0.00 sec) mscenq1_parts2.htm <select name="<TMPL_VAR NAME="unit1">" size=1> <option value="1">PCS</option> <option value="2">SET</option> <option value="3">BOX</option> <option value="4">ROLL</option> <option value="5">PAIR</option> <option value="6">CAN</option> <option value="7">DOZ</option> <option value="8">KGS</option> <option value="9">MTR</option> <option value="10">SHT</option> <option value="11">TUBE</option> <option value="12">PKT</option> <option value="13">TIN</option> <option value="14">BTL</option> <option value="15">BAG</option> <option value="16">COIL</option> </select> mscshowpartsone.pl @{ $t{units} } = qw/PCS SET BOX ROLL PAIR CAN DOZ KGS MTR SHT TUBE PKT/; ==> @{ $t{units} } = qw/PCS SET BOX ROLL PAIR CAN DOZ KGS MTR SHT TUBE PKT TIN BTL BAG COIL/;
mysql> select * from enq2_price; +----+------------------+ | id | PRICE | +----+------------------+ | 1 | EXW KOBE (OSAKA) | | 2 | EXW JAPAN | | 3 | FOB KOBE (OSAKA) | | 4 | FCA | | 5 | CFR KAOHSIUNG | | 6 | EXW CHINA | | 7 | EXW EUROPE | | 8 | EXW KOREA | +----+------------------+ 8 rows in set (0.00 sec) update enq2_price set PRICE='FCA JAPAN' where id = 4; mysql> select * from enq2_price; +----+------------------+ | id | PRICE | +----+------------------+ | 1 | EXW KOBE (OSAKA) | | 2 | EXW JAPAN | | 3 | FOB KOBE (OSAKA) | | 4 | FCA JAPAN | | 5 | CFR KAOHSIUNG | | 6 | EXW CHINA | | 7 | EXW EUROPE | | 8 | EXW KOREA | +----+------------------+ 8 rows in set (0.00 sec) insert into enq2_price (PRICE) values('FCA KOREA'); insert into enq2_price (PRICE) values('FCA CHINA'); insert into enq2_price (PRICE) values('FCA EUROPE'); insert into enq2_price (PRICE) values('FCA JAPAN'); mysql> select * from enq2_price; +----+------------------+ | id | PRICE | +----+------------------+ | 1 | EXW KOBE (OSAKA) | | 2 | EXW JAPAN | | 3 | FOB KOBE (OSAKA) | | 4 | FCA | | 5 | CFR KAOHSIUNG | | 6 | EXW CHINA | | 7 | EXW EUROPE | | 8 | EXW KOREA | | 9 | FCA KOREA | | 10 | FCA CHINA | | 11 | FCA EUROPE | | 12 | FCA JAPAN | +----+------------------+ 12 rows in set (0.00 sec)
mysql> select * from enq2_price; +----+------------------+ | id | PRICE | +----+------------------+ | 1 | EXW KOBE (OSAKA) | | 2 | EXW JAPAN | | 3 | FOB KOBE (OSAKA) | | 4 | FCA | | 5 | CFR KAOHSIUNG | +----+------------------+ 5 rows in set (0.08 sec) mysql> INSERT enq2_price (PRICE) VALUES('EXW CHINA'); Query OK, 1 row affected (0.19 sec) mysql> INSERT enq2_price (PRICE) VALUES('EXW EUROPE'); Query OK, 1 row affected (0.03 sec) mysql> INSERT enq2_price (PRICE) VALUES('EXW KOREA'); Query OK, 1 row affected (0.01 sec) mysql> select * from enq2_price; +----+------------------+ | id | PRICE | +----+------------------+ | 1 | EXW KOBE (OSAKA) | | 2 | EXW JAPAN | | 3 | FOB KOBE (OSAKA) | | 4 | FCA | | 5 | CFR KAOHSIUNG | | 6 | EXW CHINA | | 7 | EXW EUROPE | | 8 | EXW KOREA | +----+------------------+ 8 rows in set (0.00 sec) mysql> select * from parts_nu; +----+------------+ | id | parts_Unit | +----+------------+ | 1 | PCS | | 2 | SET | | 3 | BOX | | 4 | ROLL | | 5 | PAIR | | 6 | CAN | | 7 | DOZ | | 8 | KGS | | 9 | MTR | +----+------------+ 9 rows in set (0.11 sec) mysql> INSERT parts_nu (parts_Unit) VALUES('SHT'); Query OK, 1 row affected (0.17 sec) mysql> INSERT parts_nu (parts_Unit) VALUES('TUBE'); Query OK, 1 row affected (0.05 sec) mysql> INSERT parts_nu (parts_Unit) VALUES('PKT'); Query OK, 1 row affected (0.05 sec) mysql> select * from parts_nu; +----+------------+ | id | parts_Unit | +----+------------+ | 1 | PCS | | 2 | SET | | 3 | BOX | | 4 | ROLL | | 5 | PAIR | | 6 | CAN | | 7 | DOZ | | 8 | KGS | | 9 | MTR | | 10 | SHT | | 11 | TUBE | | 12 | PKT | +----+------------+ 12 rows in set (0.00 sec)
mscenq1_parts2.htm <select name="<TMPL_VAR NAME="unit1">" size=1> <option value="1">PCS</option> <option value="2">SET</option> <option value="3">BOX</option> <option value="4">ROLL</option> <option value="5">PAIR</option> <option value="6">CAN</option> <option value="7">DOZ</option> <option value="8">KGS</option> <option value="9">MTR</option> <option value="10">SHT</option> <option value="11">TUBE</option> <option value="12">PKT</option> </select>
返回