Skip to content
ChaoticaDev edited this page Jan 8, 2017 · 2 revisions

HowTo

Creating a course via database can be achieved with the following SQL command:

INSERT INTO courses (Title, Description, Icon) VALUES ('Course Title', 'Course Description', 'Pregnant-96')


Creating a lesson via database can be achieved with the following SQL command:

INSERT INTO lessons (CID, Title, Description, Icon) VALUES ('1', 'Lesson Title', 'Lesson Description', 'Family Man Woman-96')


Database structure

ID LID Title Icon created_on LTO LFROM
Question ID Parent Lesson ID Sentence text in it's source language Icon filename Automatic: Data/Time created Language translating to Language translating from

LTO


This indicates the language the sentence is being translated to. IE: If the sentence is an English sentence, it would be translated to a language other than English.

LFROM


This indicates the language the sentence is being translated from. IE: If the sentence is an English sentence, it would be translated from English to a language other than English.

Questions rely on question_words (ChaoticaWord) to build the sentence.


Database structure

ID QID Language WID created_on
Question Word ID Target Question ID Sentence text in it's source language Word ID's separated by comma Automatic: Data/Time created

WID

Each sentence is built by grabbing single word entries by ID separated by Comma. Keep in mind that it will grab words from either english_words or spanish_words based on the source language supplied.

For example, You have two words: The (ID=1) Brother (ID=6) and they are English words. You would create an entry with the following SQL command:

INSERT INTO question_words (QID, Language, WID) VALUES (1, 1, "1,6")

Clone this wiki locally