Jump to content

a really skewed-up SQL statement


aftab_jii

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.