AriSalve!
Vorrei un Vs consiglio.
Sto realizzando un motore di ricerca con più opzioni di scelta che si combinano (10 diverse possibilità):
1 - Dato che per fare ciò devo fare molti if....then..end if, mi chiedevo se ci fosse un metodo alternativo al classico if:
2 - Un codice scritto così è molto pesante?
Es:
if (IDscheda) = "" and q <> "" and (foto) = "" then
sqlCount="select COUNT(IDuser) from scheda WHERE ruolo='"&q&"' AND complete = 'Y'"
ElseIf and q = "" and (foto) = "" and (stato) = "" and (classe) = "" then
sqlCount="select COUNT(IDuser) from scheda WHERE IDuser='"&IDscheda&"' AND complete = 'Y'"
ElseIf (IDscheda) <> "" and q <> "" then
sqlCount="select COUNT(IDuser) from scheda WHERE IDuser='"&IDscheda&"' AND complete = 'Y'"
......
......
.....
end if
AriGrazie!

Rispondi quotando