First, I would see if any other children in the school have gotten food poisoning. It's unlikely that if it's truly an issue, your daughter is the ONLY child getting sick. If more than one child has gotten sick, phone the school and report it. If not, it's likely a personal problem with your child.
Second, be sure she has been tested for any allergies or intolerances. Gluten intolerance and dairy/lactose intolerance usually show up with abdominal discomfort or upset stomach. See if she has a similar reaction to those types of foods at home, as well.
However, it's worth noting that your child may be stressed about something else, and that's why she is uncomfortable. Most school nurses know that kids can and do fake illness to leave school. It's worth looking into this to see if there is a connection as well. Is she nervous about tests? Does she have a bully targeting her?