Hi, sorry for the easy question. I have a table "lessons" I query this way:
"SELECT lesson_id,title,total_time FROM lessons WHERE lesson_id>=$id AND group_id>=$group_id ORDER BY group_id,lesson_id LIMIT 0,2" lesson_id is primary and autoincrement. This query perfectly works and it does exactly what is supposed to do. Then I have another table ('purchase_data'), with a column 'group_id' (related to the 'group_id' of 'lessons' table) and a "wasPurchased" field that can take boolean values (0 or 1: 1 meaning the related item has been purchased). Now, I want to modify that query to extract if the lesson has been purchased. I know I can use JOIN, but I don't understand how I can do it starting with that query. Could you help me? Thanks in advance! -- View this message in context: http://old.nabble.com/how-to-perform-join--tp33280818p33280818.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users