Welcome to healthcaremagic.
From the description the most probable cause of fainting
may be that your kid is having some fluid electrolyte imbalance
because of not taking adequate diet and fluid ,the pain aggravate the condition and postural hypotension
may lead to fainting attacks .
the kid is to be examined and detailed history to be taken to reach a diagnosis and proper treatment .
any severe pain
may lead to fainting attack .
please follow the advice of doctor .
hope your daughter be alright soon .