begin
/**procedure body**/
if(m_parameter=‘‘) then
set @sqlStr=concat(‘select id,title,description,msg,logo,notice,views,grade,commenttimes from kmb01‘,‘ order by ‘,m_sort,‘ ‘,m_sortType,‘ limit ‘,m_index,‘,‘,m_length);
else
set @sqlStr=concat(‘select id,title,description,msg,logo,notice,views,grade,commenttimes from kmb01 where ‘,m_parameter,‘ order by ‘,m_sort,‘ ‘,m_sortType,‘ limit ‘,m_index,‘,‘,m_length);
end if;
PREPARE msql from @sqlStr;
EXECUTE msql;
end
时间: 2024-10-12 18:36:09