PDA

View Full Version : How to replace all database ip user?


geevest.com
08-21-2007, 07:53 AM
How to replace all database ip user?
Such as member "A" want to replace all the post using Ip 1.2.3.4
All that I know is, it can be replaced from mysql database, but it takes one and one, cannot doit together.
How to relpace all the post member A

Eikinskjaldi
08-21-2007, 08:00 AM
How to replace all database ip user?
Such as member "A" want to replace all the post using Ip 1.2.3.4
All that I know is, it can be replaced from mysql database, but it takes one and one, cannot doit together.
How to relpace all the post member A

Replace what with what, exactly? replace the user? replace the post text?

geevest.com
08-21-2007, 08:07 AM
replace ip adress.
example : user A post <192.168.0.1>
i want replace all Ip address user A like this <192.168.5.4>
all post

Eikinskjaldi
08-21-2007, 01:03 PM
replace ip adress.
example : user A post <192.168.0.1>
i want replace all Ip address user A like this <192.168.5.4>
all post


update post set ipaddress='new.ip.address' where ipaddress='old.ip.address'

geevest.com
08-22-2007, 06:40 AM
can u give me the sample? thx

Eikinskjaldi
08-22-2007, 07:10 AM
can u give me the sample? thx


I just did!

update post set ipaddress="192.168.0.1" where ipaddress="192.168.5.4"

geevest.com
08-22-2007, 07:25 AM
okay im try friend

You are not authorized to execute SQL queries

Eikinskjaldi
08-22-2007, 07:38 AM
How are you trying to execute the SQL query? Are you using the cl, something like phpmyadmin, or vBulletin's admin cp?

Not all users are given permission to run queries.

geevest.com
08-22-2007, 07:44 AM
okay i set '1' in config.and its done...im try now :

----------------------------------
update post set ipaddress="202.138.235.29" where ipaddress="202.138.235.29"
----------------------------------

------------------
Confirm Query Execution
This query may modify data in your database. If this change is done in error, it is possible that you will not be able to recover from this change. Are you sure you wish to continue?
----------------

Continue or restart?

Eikinskjaldi
08-22-2007, 08:03 AM
You can continue, but that query won't do anything. You're taking the ipaddress where it is 202.138.235.29 and replacing it with 202.138.235.29 (the same number).

Before you continue, what are you trying to do (besides add <>'s around IP addresses)? What's your end goal?