在做二岸快捷之时,因为用户要上传文档,怎么办啊?我在数据库里做了多个值,反正的的便保存,未上传者便为空。
![]() | id![]() | number | hblfile | hbltxlfile | mblfile | mbltxlfile | loadingfile | op | input | ||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | ![]() | 1 | 2012050002 | 222 | 222 | ||||||
![]() | ![]() | 6 | 2012050002 | 120522-09-53-520.xls | 4 | 11010 | 20120522095352 | ||||
![]() | ![]() | 7 | 2012050002 | Yes | 11010 | 20120522095352 | |||||
![]() | ![]() | 8 | 2012050002 | 120522-09-53-521.php | 11010 | 20120522095352 | |||||
![]() | ![]() | 9 | 2012050002 | dfdfdf | 66 | ||||||
![]() | ![]() | 10 | 2012050002 | dfaffffaafsf |
查询是,灵感源于此。 点击打开链接
select * from attfile A where not exists (selct * from attfile where num ber=A.number and hbltxlfile > A.hbltxlfile)// +----+------------+---------+------------+---------+------------+---------- ------+----------------+ | id | number | hblfile | hbltxlfile | mblfile | mbltxlfile | loadingfi op | input | +----+------------+---------+------------+---------+------------+---------- ------+----------------+ | 7 | 2012050002 | | Yes | | | 11010 | 20120522095352 | +----+------------+---------+------------+---------+------------+---------- ------+----------------+ 1 row in set (0.00 sec) mysql>