help for sql select command !!!

  • Thread starter Thread starter miladhatam
  • Start date Start date
M

miladhatam

Hi Everyone!
Imagine we have 3 checkBoxes in a search page and 3 boolean fields in
DB table and every checkbox is for one of these fields . In search
page users check every 3 checkBoxes and what i want is that first it
shows the records that every their 3 fields are checked then 2 and
then 1(DESC).
BTW my DB is MS Access.
Please help me !
 
Hi Everyone!
Imagine we have 3 checkBoxes in a search page and 3 boolean fields in
DB table and every checkbox is for one of these fields . In search
page users check every 3 checkBoxes and what i want is that first it
shows the records that every their 3 fields are checked then 2 and
then 1(DESC).
BTW my DB is MS Access.
Please help me !

ORDER BY field1, field2, field3
gives you that result. however it is not clear what does "then 2"
mean, because it could be first two, or first and third, or second and
third option
 
Thanks Alexy !

I meant after that it shows the records that have 2 checked fields and
then shows the records that have 1 checked field .
You got it . I'll try it
 
Thanks Alexy !

I meant after that it shows the records that have 2 checked fields and
then shows the records that have 1 checked field .
You got it . I'll try it

In my example if you have

X _ X
X X X
X _ _
X X _
_ _ X

you will get the result set ordered like this

X X X (3)
X X _ (2)
X _ X (2)
X _ _ (1)
_ _ X (1)
 
Back
Top