Jump to content

Recommended Posts

okey..

i have a really complex query..

the reason im asking this is to save my time..

i have two mysql databases..herezz the structure..

 

Database A (old):

It has about 150 users with permissions to about 5 to 10 application

Every application can be given and denied permission to a function within the application by setting 0 and 1..the data for the users looks something like this:

 

Username  Application Name  Function1  Function2  Function3  Function4  Function5  Function6

--------------------------------------------------------------------------------------------

XYZ          Sales                      1          0                0          1              1            1

ABC          Sales                      1            1                1          0              0              0 

 

Database B (new):

In this database the users are assigned groups and the rest of the table is the same:

 

Username  Group  Application Name  Function1  Function2  Function3  Function4  Function5  Function6

---------------------------------------------------------------------------------------------------

XYZ          Logistics    Sales                      1          0                0          1              1            1

ABC          Logistics    Sales                      1            1                1          0              0              0 

 

Now what i want to do is to copy the data for each function from Database A into Database B so that

the permissions in the Database B would be same as Database A...since the only differnce is that in Database B the users are assigned groups..

 

can anyone help me please

Link to comment
https://forums.phpfreaks.com/topic/50990-a-really-skewed-up-sql-statement/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.