I'm very new to Autoplay and I was working with a SQL database and I used this snip from another app but I’m trying to find out how to make it pick up and list all records (rows) that have the entryid (?) or lets say (1) I know I have to change what’s in red and add some but I can't seem to get it working.If you can help please explain so I may learn.
Thanks
function DisplayMoreNotes (nRecordNotes)
-- initialize local variables
local err = 0;
local sEntryID = "";
local sNotes = "";
local sQuery = "";
local tbResults = {};
local nRow = 0;
-- remove all items from the listbox.
ListBox.DeleteItem("InputMoreNotes", -1);
-- open the database
OpenDatabase();
-- Query DB table for results matching provided criteria
sQuery = "SELECT * from TimeDate WHERE (entryid="..nRecordNotes..")";
tbResults = SQLite.QueryToTable(db, sQuery);
-- check query results
err = CheckError("DisplayNotes(): DB Query");
-- continue only if there was no error
if err == 0 then
-- since we are only dealing with one record (unique key), there will only be one row returned.
nRow = 1;
-- gather all data
sDate = tbResults.Data[nRow]["Date"]
-- display all data to the user
ListBox.AddItem("InputMoreNotes", tbResults.Data[nRow]["Date"]);
-- select the displayed record in the listbox, if it isn't selected already
SelectMoreNoteItem(nRecordNotes);
end
-- Close the Database
CloseDatabase();
end

