An SQL database has nothing to do with making player run shops. Good grief.
Think about the goal. You want shops that a player can open, sell goods from, buy goods from other players (and NPC's?), and perhaps have an NPC assistant that will operate the shop while you're offline, or adventuring, or whatever.
So, start with the standard NPC shop. If the code is entirely in the NPC itself, you'll need to refactor it so much of the shop functionality lies in the room code (or perhaps in an object which the player can set down to "open" the shop). If you go the room route, the admins will need to grant each player a room to use as a shop. If it's object based, it just needs to be coded so only the owner of the object can pick it up.
Let's go the object route. A player gets this object somehow (quest, money, whatever) and it provides the buy/sell/list/etc commands to the environment. You might also need commands to stock and remove items from the inventory (without buying or selling them), and commands to show the current money total, and deposit/withdraw funds. Finally, a command to summon an NPC shopkeeper, and dismiss him.
Do you NEED the NPC? Well, not really... but it's nice for flavor, and if you wanted to go the realism route of letting people try to shoplift or break into the till, the NPC could defend it.
So you make your sales cart object, the player buys it, and while in his inventory, stocks it with items and some cash. Then he plunks it down somewhere and perhaps summons the NPC vendor. When another player (or NPC?) wanders up, they find the room the cart is in acts like a regular shop. They can buy items (depleting the inventory, but adding to the till), maybe they can sell items.
The player who owns it can check the till, restock, adjust prices. Maybe you can let them set minimum and maximum prices so the vendor code can scale based on supply. If they have 10 loaves of bread, they're 1g each, but when they're down to 2 loaves, they might charge 3g each. Likewise, for buying items.... the vendor may pay at most 10X the item's "value" if it's rare, or refuse to buy it if it already has plenty (or not enough funds).