Jose Manuel Guerrero-Reyes, 25, appeared in probable cause court Monday morning on a charge of aggravated assault causing serious bodily injury, a second degree felony.
A judge set Guerrero-Reyes' bond at $40,000 and ordered him to not possess firearms if he is released.
WATCH: Guerrero-Reyes' appearance in probable cause court
Guerroro-Reyes was at the Sabadomingo flea market at 8712 Airline in north Houston Sunday night and had a gun in his pocket, according to deputies.
The flea market hosts a dance on Sunday, which was full of families with small children.
The gun went off and one party-goer was struck directly in the leg, but police say the bullet went straight through.
That bullet is believed to have ricocheted, leaving six others struck by its fragments.
All of the victims went to the emergency room as a precaution.
Gonzalez said that weapons are prohibited inside the dance hall, as it is typically a family-friendly event.
Guerrero-Reyes allegedly told deputies he had it in his pocket before it slipped, causing the discharge.
Follow Deborah Wrigley on Facebook and Twitter.