vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   SQL Query code to get members Name & IP address (https://vborg.vbsupport.ru/showthread.php?t=278489)

93Corvette 02-13-2012 03:10 AM

SQL Query code to get members Name & IP address
 
How do you display the User Name and IP address of all members on your forum?
I want to see which countries my members are coming from.

I know I can go to each members profile and see their user name and IP address, but I want to just Execute SQL Query (but don't know who to code it) and have it pull all of them. Then I will place this info in an Excel database and use this website to see which countries the user is from:
http://software77.net/geo-ip/multi-lookup/

I know you can get the member by using this SQL query, but how do you add the IP address next to them?
(Also this list only members in group 2, how so you get everyone?)
SELECT username FROM user WHERE usergroupid = 2 ORDER BY username

Thanks....

Simon Lloyd 02-13-2012 02:04 PM

Why not check how it's done in the WOL? as admin you can see their names and IP :)

kh99 02-13-2012 02:15 PM

Quote:

Originally Posted by 93Corvette (Post 2299136)
I know you can get the member by using this SQL query, but how do you add the IP address next to them?
(Also this list only members in group 2, how so you get everyone?)
SELECT username FROM user WHERE usergroupid = 2 ORDER BY username

Thanks....

Try

SELECT username, ipaddress FROM user ORDER BY username

93Corvette 02-17-2012 05:29 AM

Thank you....


All times are GMT. The time now is 09:38 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01059 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete