Guest User

Untitled

a guest
Jan 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. * Category
  2. - category_id (integer)
  3. - category_name (string/text)
  4.  
  5. * Questions
  6. - question_id (integer)
  7. - question_category (integer)
  8. - question_text (string/text)
  9. - question_correct_answer_id (integer)
  10.  
  11. * Answers
  12. - answer_id (integer)
  13. - question_id (integer)
  14. - answer_text (string/text)
  15.  
  16. `SELECT * FROM Questions WHERE 'question_category' = 1`
  17.  
  18. SELECT * FROM Answers WHERE 'question_id' = 'your question's id'
  19.  
  20. FMDatabase *dbQuestions = [FMDatabase databaseWithPath:@"/tmp/tmpA.db"];
  21. FMDatabase *dbAnswers = [FMDatabase databaseWithPath:@"/tmp/tmpB.db"];
  22. FMDatabase *dbPeople = [FMDatabase databaseWithPath:@"/tmp/tmpC.db"];
  23. [...]
  24. [dbQuestions open]
  25. [dbAnswers open]
  26. [dbPeople open]
  27. [...]
Add Comment
Please, Sign In to add comment