Hi guys!
bindToDataBase question:
database.executeSQL("CREATE TABLE food(pk INTEGER PRIMARY KEY, category VARCHAR(25), title VARCHAR(25), subtitle VARCHAR(25), image VARCHAR(255), right_image VARCHAR(255), js VARCHAR(255), description TEXT)");
database.executeSQL("INSERT INTO food(category,title,subtitle,image,right_image,js,description) VALUES('MEAT','Rabbit','','','','foodDetails()','Rabbit is very good')");
database.executeSQL("INSERT INTO food(category,title,subtitle,image,right_image,js,description) VALUES('MEAT','Beef','','','','foodDetails()','Steak is very good')");
...
table works great, with sections at the right place, but I need to open a detail.html to show the food description, so the next step to do would be:
function foodDetails (pk) {
var navController = new NKNavigationController();
navController.gotoPage("detail.html?myVar="+pk);
}
where "pk" should be the index of the database, so in the detail.html I can get all the data from the table and show the full description.
Any ideas?
