-
beh si...come dice Icelord dovresti creare una stringa sql dinamica facendo delle if sulle variabili
es.
strsql = "SELECT * FROM [vendita] WHERE id>0 " if scelta<>"" then strsql=strsql & " and tipologia='" & scelta & "' " end if if sceltacategoria<>"" then strsql=strsql & " and categoria='" & sceltacategoria & "' " end if if sceltalocalita<>"" then strsql=strsql & "AND localita='" & sceltalocalita & " " end if strsql = strsql & " ORDER BY ID DESC; "Per escludere un valore basta che passi alla query quest'ultimo vuoto.
vabè alla fine te l'ho fatta...:D
-
Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.
Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.
Con il tuo contributo, questo post potrebbe essere ancora migliore 💗
Registrati Accedi