using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class MultiOrderPagerSQLTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
web.MultiOrderPagerSQL sql = new web.MultiOrderPagerSQL();
//sql.addOrderField("t1.id", "desc");//第一排序字段
sql.addOrderField("t1.hits", "desc");//第二排序字段
sql.table = "joke t1,type t2";
sql.outfields = "t1.*,t2.type";
sql.nowPageIndex = 5;
sql.pagesize = 10;
sql.where = "t1.typeid=t2.typeid";
Response.Write(sql.getSQL());
}
}
以上在AC和MS SQL 2000(5)上测试通过。
暂时做出这样一个类,没有做成存储过程,要做的话,还有一点难度呢 ,呵呵。
您可能感兴趣的文章: