SQL DELETE question

Infixo

Deity
Joined
Jan 9, 2016
Messages
4,015
Location
Warsaw
you mean for a table that may or may not exist?

if so, no.

if the table exists you get your row deletion. If the table does not exist you get an error in the database.

You can, however, add the table before making any deletes:
Code:
CREATE TABLE IF NOT EXISTS 
LRS_GreatWallEffects (
	Name 	text 		default null,
	Value 	text 		default null);
This can cause compatibility issues in that if you are trying to deal with a table that is introduced by a JFD mod, for example, and he has altered the contents of one of his custom tables, if your mod fires before JFD's mod, you kill off his intended definition of the table. So you should always add a refeence in your modinfo file (modbuddy's "Associations" tab under "Mod Properties") so that in this example if both your mod and JFD's mod are enabled by the user, JFD's mod would load 1st and create the table within the database as JFD's mod needs it to be structured. Your mod would then never actually add the new table whenever JFD's mod is also enabled.
 
How do you remove items from another project for example I am doing a basically Vox populi Redo for Rome... I want to Remove a few Uniques...?
 
Top Bottom