This is a discussion on Allow user to create table via the Internet within the MySQL Database forums, part of the Database Forums category; Hello, I have a web site that allow user to login and create their user and password, after that, they ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I have a web site that allow user to login and create their user and password, after that, they will also create a address table for themself with their own privilege that allow them to modify and delete the table. My question is should I allow the table to create according to the user? Any security issue? this is the real database user table name address password name_address_book add_id name address state city zip country if I use my name as a login: kwan then the table for the address book is kwan_address_book if my friend naem: lilo then his table for the address book is lilo_address_book should I create each user with the table like that or I should store the information altogether in one table which share with all other users. Hope to get some explaination THank you Kwan |
|
|||
|
On 30 May 2007 10:27:47 -0700, kwan <kwan.jingx@gmail.com> wrote:
>should I create each user with the table like that or I should store >the information altogether in one table which share with all other >users. Hope to get some explaination Second option. You can have a table like : table : user user_id * .... table : address_book user_id add_id * .... The primary key on these tables is shown with a *. user_id in address_book is a foreign key to our user table. Having only two tables will be far easier to work with. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|