實現月排行計算以及省/市/區js聯動

今天寫了些無聊的代碼:

public void run() {
//context.log("RUNNING..." + System.currentTimeMillis());
System.out.println("Busy in ranking... " + new Date() + ".");
String del_sql="delete from rank";
String update_sql="insert into rank SELECT product.product_id,product.product_name ,sum(quantity) total FROM order_item,shop_order,product where order_item.order_id=shop_order.order_id and product.product_id=order_item.product_id group by product.product_id order by total desc limit 0,10";
try {
Connection conn = Dbutil.getConn();
Statement sm = conn.createStatement();
sm.execute(del_sql);
sm.execute(update_sql);
//sm.execute("select * from rank order by sale desc");
//ResultSet rs = sm.getResultSet();
//while(rs.next()){
//System.out.println(rs.getString("product_name"));
//}

} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}



所属省份:




也算有點收獲.至少耐性.
睡覺..去..

你可能感兴趣的:(Lucy的胡话)