MySQL操作程序四十(Order summary网页程序4,各种输出)
返回
各种画面
- 检索客户功能
- 检索采购方功能
- 输出统计画面
以ORDER为对象处理
- 把统计画面写入EXCEL文件中
对客户(order1),以客户为对象处理
- 入庫状況(ORDERの日付)
有ORDER没有入庫的放最前面
- 出荷明細(出荷の日付)
posttime排顺序
没有出荷的放最前面
- 入金済み(入金の日付)
paytime排顺序,没有付钱的排最前面
- MySQL操作程序二十,mscorder1.pl,mscorder1.htm
- ******************************************************
- 船主テーブルの項目の修正=>msc243关联修改
- 船主テーブルの項目の修正=>msc242关联修改
- 船主データ管理と販売情報=>msc241关联修改
- 船主テーブル(owners)項目追加=>msc244关联修改
船主テーブル(owners)項目追加=>enq1画面关联修改(没有修改)
- 增加owners的客户代号项目name(放在company的后面),有关界面HTM的检查和修改
- makers已有nationid
- ==============没有ORDER;status=0;time=order1该列的创建时间;paytime:2010-00-00;orderno:空白;post=NO
- 未收到货款,未发货的ORDER;status=1;time=orderno输入时的时间;paytime:2010-00-00;orderno:客户order编号;post=NO
- 未收到货款,已发货的ORDER;status=2;time=orderno输入时的时间;paytime:2010-00-00;orderno:客户order编号;post=发货地点
- 已收到货款,未发货的ORDER;status=3;time=orderno输入时的时间;paytime:收款时间;orderno:客户order编号;post=NO
- 已收到货款,已发货的ORDER;status=4;time=orderno输入时的时间;paytime:收款时间;orderno:客户order编号;post=发货地点
对采购方
- 入庫状況(ORDERの日付)==>在order1上处理
- 支払い済み(支払いの日付)==>在enq2上处理
- 日本/非日本厂家指定
- ================没有订货;status=0
- 未付货款,未收货物的ORDER;status=1
- 未付货款,收到货物的ORDER;status=2
- 已付货款,未收货物的ORDER;status=3
- 已付货款,收到货物的ORDER;status=4
mysql> ALTER TABLE order1 ADD arrivaltime DATE NOT NULL DEFAULT '2011-00-00' aft
er status;
Query OK, 12383 rows affected (0.69 sec)
Records: 12383 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE order1 ADD arrivalmemo TEXT after arrivaltime;
Query OK, 12383 rows affected (0.55 sec)
Records: 12383 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE order1 ADD size TEXT;
Query OK, 12383 rows affected (0.75 sec)
Records: 12383 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE order1 ADD weight TEXT;
Query OK, 12383 rows affected (0.86 sec)
Records: 12383 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE order1 ADD posttime DATE NOT NULL DEFAULT '2011-00-00' AFTER
post;
Query OK, 12383 rows affected (0.86 sec)
Records: 12383 Duplicates: 0 Warnings: 0
mysql> show columns from order1;
+-----------------+-----------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+-----------+------+-----+------------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| time | date | YES | | NULL | |
| orderno | text | YES | | NULL | |
| ORIGINid | int(11) | YES | | NULL | |
| PRICEid | int(11) | YES | | NULL | |
| PAYMENTid | int(11) | YES | | NULL | |
| DELIVERY | text | YES | | NULL | |
| memo | text | YES | | NULL | |
| consignee | text | YES | | NULL | |
| changeprice | text | YES | | NULL | |
| discount | text | YES | | NULL | |
| total | text | YES | | NULL | |
| LANGUAGEid | int(11) | YES | | NULL | |
| packing_charge | text | YES | | NULL | |
| freight_charges | text | YES | | NULL | |
| delivery_charge | text | YES | | NULL | |
| delivery_place | text | YES | | NULL | |
| disc | text | YES | | NULL | |
| shipping | text | YES | | NULL | |
| packing | text | YES | | NULL | |
| packing_info | text | YES | | NULL | |
| post | char(100) | NO | | NO | |
| paytime | date | NO | | 0000-00-00 | |
| status | int(11) | NO | | 0 | |
+-----------------+-----------+------+-----+------------+----------------+
24 rows in set (1.00 sec)
-------------------------------------------------------------------------------
mysql> ALTER TABLE owners ADD name CHAR(100) AFTER company;
Query OK, 328 rows affected (0.41 sec)
Records: 328 Duplicates: 0 Warnings: 0
mysql> show columns from owners;
+----------+-----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+-----------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| company | char(100) | YES | | NULL | |
| name | char(100) | YES | | NULL | |
| address | char(100) | YES | | NULL | |
| person | char(50) | YES | | NULL | |
| telfax | char(100) | YES | | NULL | |
| email | char(100) | YES | | NULL | |
| homepage | char(100) | YES | | NULL | |
| memo | char(100) | YES | | NULL | |
+----------+-----------+------+-----+---------+----------------+
9 rows in set (0.02 sec)
mysql> ALTER TABLE owners DELETE name;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'DELET
E name' at line 1
mysql> ALTER TABLE owners DROP name;
Query OK, 328 rows affected (0.47 sec)
Records: 328 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE owners ADD name CHAR(100) NOT NULL DEFAULT 'NA';
Query OK, 327 rows affected (1.09 sec)
Records: 327 Duplicates: 0 Warnings: 0
mysql> show columns from owners;
+----------+-----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+-----------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| company | char(100) | YES | | NULL | |
| address | char(100) | YES | | NULL | |
| person | char(50) | YES | | NULL | |
| telfax | char(100) | YES | | NULL | |
| email | char(100) | YES | | NULL | |
| homepage | char(100) | YES | | NULL | |
| memo | char(100) | YES | | NULL | |
| name | char(100) | NO | | NA | |
+----------+-----------+------+-----+---------+----------------+
9 rows in set (0.01 sec)
mysql> show columns from owners;
+----------+-----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+-----------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| company | char(100) | YES | | NULL | |
| address | char(100) | YES | | NULL | |
| person | char(50) | YES | | NULL | |
| telfax | char(100) | YES | | NULL | |
| email | char(100) | YES | | NULL | |
| homepage | char(100) | YES | | NULL | |
| memo | char(100) | YES | | NULL | |
+----------+-----------+------+-----+---------+----------------+
8 rows in set (0.23 sec)
mysql> show columns from makers;
+----------+-----------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+-----------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| company | char(100) | YES | | NULL | |
| address | char(100) | YES | | NULL | |
| person | char(50) | YES | | NULL | |
| telfax | char(100) | YES | | NULL | |
| email | char(100) | YES | | NULL | |
| homepage | char(100) | YES | | NULL | |
| memo | char(200) | YES | | NULL | |
| nationid | int(11) | NO | | 2 | |
+----------+-----------+------+-----+---------+----------------+
9 rows in set (0.02 sec)
返回