随机记录sql

随机记录sql

   日期:2017-06-15

Randomize
r = Rnd 
'sqlsj="select top "&artsj&" id,title from article  where id <>"&id&" order by rnd(" & r & "-id)"
sqlsj="select top "&artsj&" id,title from article  where id <>"&id&" and classid="&Classid&" order by rnd(" & r & "-id)"
artsjstr=getartsj(sqlsj)