The shooting happened around 6:30 p.m. at the Ruby Tuesday along the 8600 block of Bartram Avenue.
Police say a man in his late 30's stood up from a seat and put his hand in his pocket.
The man then pulled the trigger of a gun that was also in his pocket.
The bullet struck the man in his leg.
He was rushed by medics to the Hospital of the University of Pennsylvania for treatment.
Police say he is in good condition.
They are, however, investigating whether he has a permit to carry the gun.