Jump to content

query to obtain information of particular client services


Sylvert

Recommended Posts

Hello, I have a question on how to obtain information from the servers of a particular customer. How could adapt the following query to only show me of a particular customer?

 

SELECT a.ip_address, a.game_port, b.* FROM tc_game_services a, tc_game_service_live_stats b WHERE online = 1 AND a.service_id = b.service_id;

Link to comment
Share on other sites

You should be able to remove this:

AND a.service_id = b.service_id;

 

And add something like this:

AND a.client_id = b.client_id;

 

I would have to take a look at the DB for the proper client variable but I think that is correct.

Link to comment
Share on other sites

Like this. Replace c.user_id=1 with the id of the user you want.

 

SELECT a.ip_address, a.game_port, b.* FROM tc_game_services a, tc_game_service_live_stats b, tc_services c WHERE online = 1 AND a.service_id = b.service_id AND c.service_id = a.service_id AND c.user_id=1;

Link to comment
Share on other sites

Like this. Replace c.user_id=1 with the id of the user you want.

 

SELECT a.ip_address, a.game_port, b.* FROM tc_game_services a, tc_game_service_live_stats b, tc_services c WHERE online = 1 AND a.service_id = b.service_id AND c.service_id = a.service_id AND c.user_id=1;

 

thank you very much, I worked very well the query

Link to comment
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
×
×
  • 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. Terms of Use