Dear all,
I'm creating a tool that collects URLs. But I don't want to store them twice in the db. To prevent this from happening, this is what I made:
I think that I use the completly wrong way to retrieve the URLs that are stored in the db, but I have no clue.Code:for row in db:nrows("SELECT url FROM URLTABLE") do if url ~= newurl then num=num+1 else Dialog.Message("Sorry", "you already submitted this URL before.", MB_OK, MB_ICONEXCLAMATION); preventadding=1 end end
I tried this as well:
... but the SQLite.QueryToTable does not seem to work.Code:local url = SQLite.QueryToTable(db, "SELECT url FROM ML") if url and url.Rows then for i,v in url.Rows do Dialog.TimedMessage("url", tblRS, 100, MB_ICONNONE); end end
I'm really not good with this....
Can anyone give me a hint or correct my code?
thanks
gert

Reply With Quote
