Welcome Guest, Not a member yet? Register   Sign In
creating columns
#4

[eluser]TheFuzzy0ne[/eluser]
I still don't quite understand how your system works.

First of all, you should never add anything to two places in your database (unless it's an ID). If you do, you are likely to run into problems with your data integrity.

Also, adding columns with PHP should be avoided also. If you need to dynamically add columns, it's probably an indication that your database structure is wrong. I would instead suggest you look into a way of achieving the same thing, but using rows in a table, instead of columns.

I'm not entirely sure why you need to add the columns dynamically. Can you not just add them anyway, and just keep them empty until you need to store something in them?

In the privileges table and the member table, please could you explain what type of data you plan to store in your create_shit and delete_shift fields? Also, are your IDs just there for the sake of being there, or are they used elsewhere in the app?

If you can explain a bit more about what your app is supposed to do (rather than how it does it), I might be able to offer you a better solution.


Messages In This Thread
creating columns - by El Forum - 04-27-2013, 02:36 AM
creating columns - by El Forum - 04-27-2013, 04:20 AM
creating columns - by El Forum - 04-27-2013, 04:58 AM
creating columns - by El Forum - 04-27-2013, 05:34 AM
creating columns - by El Forum - 04-28-2013, 10:13 PM
creating columns - by El Forum - 04-29-2013, 03:14 AM
creating columns - by El Forum - 04-29-2013, 04:20 AM
creating columns - by El Forum - 04-29-2013, 04:58 AM
creating columns - by El Forum - 04-29-2013, 05:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB