vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   To change all IP numbers of a single user (https://vborg.vbsupport.ru/showthread.php?t=250353)

ged 09-12-2010 07:11 AM

To change all IP numbers of a single user
 
How can I do that? Can you write a query for this?

Thanks a lot... :)

borbole 09-12-2010 01:12 PM

Quote:

Originally Posted by ged (Post 2097012)
How can I do that? Can you write a query for this?

Thanks a lot... :)

To change it in posts? First make a backup of your post table, then run the following query at phpmyadmin:

Code:

UPDATE post
        SET ipaddress = 'xxxxxxx'
        WHERE userid = x;

Replace x with the uid of the user whose ip you want to change and xxxxxxx with the new IP address that you want that user to have instead of his/her real ip. And if your db tables have a prefix you should apend it next to the table name at the query above. Hope it helps.

ged 09-12-2010 05:53 PM

Thank you very much... :)

borbole 09-12-2010 07:05 PM

Quote:

Originally Posted by ged (Post 2097234)
Thank you very much... :)

You are welcome :)

keyness 04-14-2012 12:03 PM

In which tables Ip addresses are being saved?

1) "User" table - I think this was the Ip address of registration
2) "Post" table - For every post's Ip address

But what more? For example, I do login and then logoff without an action. Or I just give a like, thanks etc.

kh99 04-14-2012 12:16 PM

Quote:

Originally Posted by keyness (Post 2320006)
For example, I do login and then logoff without an action. Or I just give a like, thanks etc.

I believe ip addresses are only saved on registration and when you post, so those other actions would not log the ip (although in an emergency you might be able to figure it out from the web server logs).

keyness 04-14-2012 12:42 PM

Hmm so, we can not detect a clone which used different registration Ip unless he/she posts.

I used to think every login's Ip is being stored.

Thank you very much.

kh99 04-14-2012 01:02 PM

Well, the ip address for the current session is saved in the session table so you could compare that to other ip addresses, but you'd have to do it while the session was active.

Bob_R 08-21-2012 03:59 PM

Since PHP and MySQL have been updated in the last 2 years post #2 in this thread doesn't work.

It asked me to select at least 1 column/row (or something like that)

What is the way to do it now?

Thanks!

Lynne 08-21-2012 04:06 PM

That query is still correct. Make sure if you use a table prefix that you add that to the beginning of the table name.


All times are GMT. The time now is 12:06 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.01096 seconds
  • Memory Usage 1,729KB
  • 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_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete