10-23-2012, 08:23 PM
1. Replace some things.
UPDATE <table> SET <column A> = '<value A>' WHERE <column B> = '<value B>';
Exemple : I want replace all mobs to the zone 0 by 127 when the NPC is '126' and the zone_num = 0
So : UPDATE t_npc_regen SET a_npc_idx = '127' WHERE a_zone_num ='0' AND a_npc_idx = '126';
In words :
Update the database to set column A = the value A when column B = the value B.
2.Delete some records.
DELETE FROM '<table>' WHERE '<column A>' = '<value A>';
Exemple : I want delete all mobs in t_npc_regen when the zone is 18.
DELETE FROM `t_npc_regen` WHERE `a_zone_num` = '18' ;
In words :
Delete the records from table when column A have the value A.
I hope i have helped
Its just a fast tutorial.
Cordially, Kotetsu.

