复制内容到剪贴板 程序代码
String sql ="Select COUNT(*) FROM PRODUCTS as p Where p.g_id="+ cate.getId() +"";
Query query = session.createSQLQuery(sql, "p", Product.class);
Query query = session.createSQLQuery(sql);
Object[] ob=query.list().toArray();
int num = =Integer.parseInt(ob[0].toString());
Query query = session.createSQLQuery(sql, "p", Product.class);
Query query = session.createSQLQuery(sql);
Object[] ob=query.list().toArray();
int num = =Integer.parseInt(ob[0].toString());