Writing a variable to a table

Here you can ask anything related to JavaScript as applied to Helium Scraper.
Post Reply
dragon73
Posts: 3
Joined: Sun Jan 11, 2015 10:07 am

Writing a variable to a table

Post by dragon73 » Sun Feb 08, 2015 8:49 am

How do I write a variable to a table directly in JavaScript?

I want to do something like:

Code: Select all

//variable "test" is a CSV string
text = Global.GetVar("test");
array = text.split(",")
array_length = array.length
for (i=0, i < array_length, i++) {
    var name_tmp = array[i];
    Global.DataBase.Query(INSERT INTO table1 (name) VALUE (name_tmp);
}
Basically, I need to split a string into parts and then write it to a single column table with a row for each split. I don't need a table ID for this table. Thanks.

Post Reply