Before using this system, I would highly recommend you use Chris Vimes SQL Explorer, to create your tables.

How it works?
SQL File System runs your SQL Queries from the file directory sql/*. Novo originally wrote this system when I started to get into heavy development since I had such a learning curve with SQL. And in all honesty working with SQL has never been easier.

-NPC Server Needs these rights

Graal Script Code:

-Depending on how many sub-folders you use.rw sql/*rw sql/*/*rw sql/*/*/*

But what if you want to add to an existing row? First you need to check if the data actually exists. You could use the cache for this or check SQL Directly. We are going to check SQL directly in this example but I would suggest you cache the data.

other optimization tips: putting your files under level/sql would let you utilize onlevelfileupdated then you could automatically cache all your SQL queries into memory/variables instead of reading from file.