Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT with 4 conditions
Message
De
23/09/2005 14:47:25
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/09/2005 01:40:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Divers
Thread ID:
01052132
Message ID:
01052522
Vues:
9
>Yes, reuery() for listbox is after SELECT.
>( SELECTs ... are in DO CASE loop - and look like this:
>
>
>case thisform.C1.value==.T. .and. thisform.C2.value==.T. .and.thisform.C3.value == .F. .and. thisform.C4.value== .T.
> *
> SELECT NAZIV from OBJEKT WHERE alltrim(POGON) == thisform._C1 .and. ;
> TIP == thisform._C2 .and. ;
> GRUPA == thisform._C4 ;
> order by NAZIV into ARRAY THISFORM.IZABERI
>
>( thisfrom._Cn keeps last value from combobox )

Are you saying you have 16 cases here? Just hope you don't get two more checkboxes, because you'd have 64 CASEs... how about
cCondition=".t."
if thisform.c1.value
   cCondition=cCondition+" and alltrim(pogon)==thisform._c1)"
endif
if thisform.c2.value
   cCondition=cCondition+" and tip==thisform._c2)"
endif
... (stuff for c3 and c4 here... and more if you need)
select naziv from objekat where &cCondition;
   order by ...
That way you can build your condition as it comes. If all four checkboxes are .f., you get all the records.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform