Delete all Non RP names from mySQL
#1

Hello, I was just wondering if there is a quick and easy way to remove all non rp names from the mysql database?
For example, delete everyone who hasnt a "_" in their name
Reply
#2

This should work.

Код:
DELETE FROM table_name IGNORE _
EDIT: Might not, I will edit it when I'll get the solution.
Reply
#3

If you are doing it with phpMyAdmin then execute this query:

SELECT * FROM tblName WHERE tblName.NameField NOT LIKE '%_%';
Reply
#4

Yea I am doing it from phpmyadmin smally Will try that, thanks
Reply
#5

Take a backup first, dude.
Reply
#6

I wont try it on the main database ofc :P
Reply
#7

Quote:

DELETE FROM users WHERE id IN (
SELECT * FROM (
SELECT id FROM users WHERE name NOT LIKE '%\_%' GROUP BY id
) AS u
)

Single query which matches all nonrp names (double subselect is due to mysql restrictions when deleting stuff)
Reply
#8

I tried both of yours. They both returned 0
Reply
#9

Did you change the query to match your table name and username etc?
Reply
#10

yea I did
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)