well, you already have an example as you already have a working script written by someone else.
all you need to do is append that.

now, if you have no slightest clue how DB's work and how to script, maybe you should start by learning something simple first.
_________________________
!

download KiXnet