Search code examples
javascriptsqlitetitaniumtitanium-mobile

Titanium appcelerator sqlite database


How do i go about flattening out an array into a string so i can then use it in my sqlite database statement.

After flattening into a string i am then wanting to try this statement. Is this possible or do i have to attempt another method of updating my database?

db.execute('UPDATE SavedList SET SavedListSub=? WHERE rowid=?',listArray,lastrow);

I assumed such things like listArray.join(); and listArray.toString();.These may in fact have worked because i can print out the listArray to the console.

Could it be that i am not doing the sqlite statement right? because i am getting an error about how many parameters are present in the statement.


Solution

  • You cannot refer rowid in where clause as a column unless you have created a column name as 'rowid' while creating the table.