Phpmyadmin - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Phpmyadmin (
/showthread.php?tid=511522)
Phpmyadmin -
kevin1990 - 06.05.2014
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.
Re: Phpmyadmin -
PinEvil - 06.05.2014
There should be an option to delete each query.
Re: Phpmyadmin -
mrtms - 06.05.2014
UPDATE `table_name` SET `columnx`='0', `columny`='0', `columnz`='0';
Don't use the WHERE clause and it'll update everything inside the table.
Re: Phpmyadmin -
Trynda - 06.05.2014
what is mysql?
Re: Phpmyadmin -
milanosie - 06.05.2014
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`