Hi everyone,
I know how to create a table such as table1={} and then do table1[1] = “abc” and table1[2] = “def” and so on. But I do not know how to add multiple rows to the way I am doing it below. I am adding a record and then submitting the data to my server but only doing one row at a time while looping through the records of an SQLite table. I would like to add multiple rows and then encode and submit the data. Can someone show me how to change the code below to do that? Thanks a lot!
Warren
local foo = {} foo.trip = { {TripID=TripID2, mileage=mileage2, statename=statename2, datemade=datemade2} } local encode = json.encode (foo)