/// <summary>
/// 分页获取数据列表
/// </summary>
public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select * from yf_scenic ");
if (!string.IsNullOrEmpty(strWhere.Trim()))
{
strSql.Append(" where " + strWhere);
}
if (!string.IsNullOrEmpty(orderby.Trim()))
{
strSql.Append(" order by " + orderby);
}
strSql.AppendFormat(" limit {0} , {1}", startIndex, endIndex);
return DbHelperMySQL.Query(strSql.ToString());
}
转载于:https://www.cnblogs.com/zzzili/p/6685221.html