Pharmaceutical compositions comprising at least one compound of the formulas (Ia) or (Ib) or (IIa) or (IIb) and a pharmaceutically acceptable carrier which is useful in a medicine wherein the symbols and substituents have the following meaning -X- is e.g. or or or and Y being or or the pharmaceutically acceptable salts, esters or amides and prodrugs of the above identified compounds of formulas (Ia) or (Ib) or (IIa) or (IIb). The compounds are applied to modulate the in-vitro and in-vivo binding processes mediated by E-, P- or L-selectin binding.