I've a query where I retrieve 2 codes.
select ida, idb from mytable.
I've an other table where I've some "labels".
id:1 text:shoes
id:2 text:socks
.....
Now, depending on what the values of the combination ida and idb are, I've
to show one of the field in table labels.
if(ida = 1 and idb = 1) idlabel = 1
if(ida = 1 and idb = 2) idlabel = 2
if(ida = 2 and idb = 1) idlabel = 3
.....
I don't know how to do so. Also, I've to be able to sort the result of the
query by the labelname.
It is possible ?
select ida, idb from mytable.
I've an other table where I've some "labels".
id:1 text:shoes
id:2 text:socks
.....
Now, depending on what the values of the combination ida and idb are, I've
to show one of the field in table labels.
if(ida = 1 and idb = 1) idlabel = 1
if(ida = 1 and idb = 2) idlabel = 2
if(ida = 2 and idb = 1) idlabel = 3
.....
I don't know how to do so. Also, I've to be able to sort the result of the
query by the labelname.
It is possible ?
Comment