Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Citazione del giorno

  1. #1
    Utente di HTML.it L'avatar di wegawhite
    Registrato dal
    Aug 2004
    Messaggi
    1,400

    Citazione del giorno

    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...

  2. #2
    Utente di HTML.it L'avatar di wegawhite
    Registrato dal
    Aug 2004
    Messaggi
    1,400
    up

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.