在做二岸快捷之时,因为用户要上传文档,怎么办啊?我在数据库里做了多个值,反正的的便保存,未上传者便为空。
id number hblfile hbltxlfile mblfile mbltxlfile loadingfile op input
查询是,灵感源于此。 点击打开链接
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>