Salve a tutti cerco aiuto per modificare il mio codice da fisso a random :
Questo e il codice fisso
strSQL = "SELECT " & tablPfx & "Ads.adID," & tablPfx & "Ads.nick," & tablPfx & "Ads.userID," & tablPfx & "Ads.pdate," & tablPfx & "Ads.pdate," & tablPfx
strSQL = strSQL & "Ads.subject," & tablPfx & "Ads.body," & tablPfx & "Ads.images FROM " & tablPfx
strSQL = strSQL & "Ads WHERE (hotlist = 1 AND status = 1) ORDER BY " & tablPfx & "Ads.pdate DESC, " & tablPfx & "Ads.images DESC;"
e vorrei trasformalo in random. Qui di seguito il codice modificato in random pero a il codice cancellato dal cancellatto . Mi potet aiuatre a far funzionare questo codice. Grazie
HotNum = #########
Rand ########## (##)
int############# = Int (############)+1
strSQL = "SELECT #############, (########), ############# ,############# , ############# ############# tablPfx & "Ads.adID," & tablPfx & "Ads.nick," & tablPfx & "Ads.userID," & tablPfx & "Ads.pdate," & tablPfx & "Ads.pdate," & tablPfx
strSQL = strSQL & "Ads.subject," & tablPfx & "Ads.body," & tablPfx & "Ads.images "
StrSQL = strSQL & " #############, (###), ########################## FROM " & tablPfx
StrSQL = strSQL & "Ads WHERE (hotlist = 1 AND status = 1) ORDER BY #############, ############## (############## ) , #############,############# , ############# (###)
Grazie a Tutti

Rispondi quotando