Has anyone used diatomaceous earth to get rid of fleas? Was it effective?

I fostered a cat recently but had to find another foster because I thought I was allergic to her.. now I think she just had fleas as I'm still getting bitten and Keeva's starting to itch (the Shelties don't seem to have any because the cat liked staying in my room.. and the Shelties prefer to stay out). I'm going to pick up Advantage for the dogs but I need something for the carpets and mattress. :\