sub["l"+m] = result.rows.item(i).l1;
sub["l"+m] = result.rows.item(i)+l+m;
This first line gets the member called 'l1' of the item, while the second gets the item object and try to add to it 'l' and '1', that's really not the same...
You may use here the fact that members in JavaScript can be accessed in two ways...
The . (dot) operator - as you do it in the first line
and [] - as you use with arrays (it works because JavaScript represents object like a hash table, where member name is the key)
So you may write the second line like this:
sub[l + m] = result.rows.item(i)[l + m];