amin jandaghiyan
amin jandaghiyan

Reputation: 1

sample code for create dynamic sql server table

I trying to build a site that is works with electronic currencies. Example, a WebMoney currency has its own set of parameters, such as wmid etc. And uKash has its own parameters also a series of other parameters, such as emails etc. Now it is not clear how many currency site administrators is introduced while the unknown parameters I thought to myself, bank currency should be constructed in a dynamic table that the user can set the parameters. Know i don't how to implement it?

Upvotes: 0

Views: 124

Answers (1)

podiluska
podiluska

Reputation: 51494

Tables can't have dynamic columns

You can add a table for each form of web currency that contains the parameters those currencies require = ie: A WebMoney table, a uKash table, etc.

Or you can add an XML column to your main table that contains the variable data information for the specific web currency in question. eg:

<webcurrency type="webmoney">
    <wmid>1</wmid>
<webmoney>

and

<webcurrency type="uKash">
    <email>[email protected]</email>
<webmoney>

Given your intention to allow for future currencies, perhaps the second choice is preferable.

Upvotes: 1

Related Questions