Ciao.
Potete spiegarmi il funzionamento di questo script?
Ho impostato le variabili (config_value):
codice:
number_quote_of_the_day = 50
quote_of_the_day
Ma alcune frasi del giorno non vengono mai visualizzate, altre invece si ripetono più volte al giorno:
codice:
open_recordset rs_getQuote,"select * from quote"
open_recordset rs,"select * from idate"
if month(now()) < 10 then
imonth = "0"& month(now())
else
imonth = month(now())
end if
idate1 = day(now()) & "/" & imonth & "/" & year(now())
idate2 = formatdatetime(rs("iday"),2)
rs.close
Randomize Timer
intRnd = (Int(RND * rs_getQuote.RecordCount))
if iquote_of_the_day = "1" then
if idate1 <> idate2 then
sql_update = "update config set config_value="&intRnd&" where config_variable = 'number_quote_of_the_day' "
conn.Execute(sql_update)
sql_update = "update idate set iday='"&now()&"'"
conn.Execute(sql_update)
rs_getQuote.Move intRnd
else
rs_getQuote.Move inumber_quote_of_the_day
end if
else
if session("id") = intRnd then
do while session("id") = intRnd
intRnd = (Int(RND * rs_getQuote.RecordCount))
loop
end if
rs_getQuote.Move intRnd
session("id") = intRnd
end if
Non capisco dove sbaglio nelle impostazioni...