"delete from t3 where user_book<'".date('Y-m-d')."'"
"select count(book_id) as booknum from t3 where user_card=".$id
"update t1 set user_booknum=".$booknum." where user_card=".$id
"select count(book_id) as booknum from t3 where user_card=".$id
"update t1 set user_booknum=".$booknum." where user_card=".$id
因为t3表里有不同用户组预借的图书,但是每个用户组的预借期限又是不同的啊,而且更新是要更新所有有过期图书的用户,并不是指当前登陆该系统时的用户