-- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored by the server -- -------------------------------------------------------------------------------- DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `QuerySoftware`( IN PageSize SMALLINT, IN PageNo int, IN OrderBy varchar(1000), OUT Total int ) READS SQL DATA COMMENT '分页存储过程,查询软件表.暂不做通用.' BEGIN DECLARE _where varchar(1000); -- 结束声明局部变量 -- -------------------------------- IF PageSize <= 1 OR PageSize >= 100 THEN SET PageSize = 15; END IF; IF PageNo < 1 THEN SET PageNo = 1; END IF; -- TODO -- ------- SELECT COUNT(id) INTO Total FROM Software x;
SELECT Id,Name,ShortName,SoftwareVersion,Downloaded,UpdateId,Uuid, PackageFilename,Md5,Size,HtmlDescription,Description,ShortDescription, UpdateInfo,HtmlUpdateInfo,OsName,OsArchitecture,HomepageURL, DownloadPageURL,DonwloadURL,Signs,Pattern,MatchType,UpdateDate, UninstallName,ManualOrderPageNum,ManualOrderInPage,MainProgram, UninstallProgram,SearchNames,HasPlugins,IsGreen,IsFree,IsBeta, IsRecommended,IsHidden,IsPopping,CreateTime,CreateUser,LastEditUser, LastEditTime,StatusId FROM Software x; END
--------- MySQL
|