Phpmyadmin
#1

Ok, I was wondering how do you delete all the data in columns with 1 sql query.


I downloaded the UGP gamemode which is SQL, It's not a blank SQL however so there are houses and DDoors everywhere.

So I see the tables in SQL and there filled with data.. But is there a sql command to just blank all the data out so the houses and DDoors are not in game and I can start from scratch with house id 1 doing /sethouse and it will tell me the next available house is 1 cause all the columns are empty?


I tried the delete query and the trunicate query.. Both of those delete everything so then if I set a house in game it does not save it to a table because I deleted them all.

I have been searching forever for this but I cannot seem to find it.

The update Query is not working either. Just keeps telling me invalid syntax.
Reply
#2

There should be an option to delete each query.
Reply
#3

UPDATE `table_name` SET `columnx`='0', `columny`='0', `columnz`='0';

Don't use the WHERE clause and it'll update everything inside the table.
Reply
#4

what is mysql?
Reply
#5

Quote:
Originally Posted by kevin1990
Посмотреть сообщение
Ok, I was wondering how do you delete all the data in columns with 1 sql query.


I downloaded the UGP gamemode which is SQL, It's not a blank SQL however so there are houses and DDoors everywhere.

So I see the tables in SQL and there filled with data.. But is there a sql command to just blank all the data out so the houses and DDoors are not in game and I can start from scratch with house id 1 doing /sethouse and it will tell me the next available house is 1 cause all the columns are empty?


I tried the delete query and the trunicate query.. Both of those delete everything so then if I set a house in game it does not save it to a table because I deleted them all.

I have been searching forever for this but I cannot seem to find it.

The update Query is not working either. Just keeps telling me invalid syntax.
Use,
Код:
DELETE FROM `houses` WHERE 1
or
Код:
DELETE FROM `houses`
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)