Yes, the script I posted is the query which you can directly input on phpMyAdmin. That script can be modified with little changes (just for syntax) if it's going to be placed on an NPC script with the query_sql(); function.
For the zero weight of the item, it should be edited on the item_db.txt/item_db2.txt files.
ID,DBName,ScreenName,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Upper,Gender,Loc,wLV,eLV,
Refineable,View,{Script},{OnEquip_Script},{OnUnequip_Script}