1 of two things happened, your blood sugar was low as hell and you didnt eat enough, or anxiety caused you to faint. Sounds like an anxiety attack