0

Trying to develop a Windows phone 8.0 Store App.I need to retrieve records from a sqlite database which are having two tables so far i did not found any tutorial for it .here is what i am doing for get data from one table

var retrievedTasks = dbConn.Query<MMain>("SELECT MMain.ID,           MMain.Name, health.age
FROM MMain INNER JOIN health ON MMain.key = health.key
where MMain.ID = 1" ).FirstOrDefault();  

but i want to achieve this to get data from two tables

       foreach (var rr in retrievedTasks)
        { 

         //how to fetch data from health class table 
        } 

so how to do this and than how to fetch Data from it

he

1 Answer 1

1

Your query looks wrong (one extra comma and you should use INNER join with the relevant ON clause)

SELECT MMain.ID, MMain.Name, health.age
FROM MMain INNER JOIN health ON MMain.key = health.key
where MMain.ID = 1

Apart that, I don't see the pb.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.