Jump to content
xisto Community
Sign in to follow this  
khmerneed

All Database Query MySql, Sql Server, All Database Talk

Recommended Posts

Dear All Friends!

 

I have create this topic for everyone who have some problem with query analyses. You could post all your problem with database. We all would have and find a solution for you.

 

Now let me start my small problem. This i have fixed but i just think of the best way.

 

I got 3 tables:

table_users (user_id,user_name,user_pass,user_group)

table_group (group_id,group_name)

table_usersingroup (ursingro_id,user_id,group_id)

 

I need output like this:

 

username | password | group

test1 | ***** | (group1,group2,group3)

test2 | ****** | (group2,group3)

test3 | **** | (group1,group2,group3,group4)

 

I hope anyone may solve this problem

 

Thanks & Best Regards,

Dorei :D

Share this post


Link to post
Share on other sites

well, khmer, i cant understand ur question, what ur mean the output will be? do you have already all instances and foreign key connected to each database?, i'm currently learning database management sytem in my coputer science course...

Share this post


Link to post
Share on other sites

Well, I already build up a relationship, as you may have seen, primarykey and foriegnkey.the output is the data which we need back... for input we are exactly know as wellwhen putbox: usernamebox: passwordslect: groups (multiselect)so, it would be TABLE table_userUSERID | USERNAME | PASSWORD1 | test1 | *****2 | test2 | *****3 | test3 | *****TABLE table_groupGROUPID | GROUPNAME1 | Group12 | Group23 | Group34 | Group4TABLE table_ursingroURSINGROID | USERID | GROUPID1 | 1 | 1 2 | 1 | 23 | 1 | 34 | 2 | 2 5 | 2 | 36 | 3 | 17 | 3 | 28 | 3 | 39 | 3 | 4I hope you make sence now...So, the out put which we need is:username | password | grouptest1 | ***** | (group1,group2,group3)test2 | ****** | (group2,group3)test3 | **** | (group1,group2,group3,group4)Thanks & Best Regards,Dorei

Share this post


Link to post
Share on other sites

Yes, that is what i am trying. Anyway i wonder if anyone have other way which is far better than this.O.K Anyway i wish all members which attend or have some problem with SQL, you may post here, so share the problem solving.Thanks & Best Regards,Dorei

Share this post


Link to post
Share on other sites
how to chnage mysql database path on windowsAll Database Query

Hi,

I need to convert the data dir path in my project.

what I did for this is, I shut downed the mysql & changed the datadir path in my.Ini file & I assigned new path for it..I placed some new extra databases in that. After that restarted mysql service...But it's showing some innodb storage error..So I'm not able to start mysql service.If started also it's taking the old path of datadir...So please give a solution is there any command to change that datadir path or any other way to solve this problem..Don't say to delete some files..I can't delete any file from that..It's highly required for my project...Also I want to know what is the max size of innodb file...So please help me in this case...

Thanks & reagrds,

Ranjan

-question by Ranjan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.