Answer the question
In order to leave comments, you need to log in
How to output sql data to json?
Good afternoon or evening.
Please help me, I have a sqlite database that looks like this:
$categories = "CREATE TABLE IF NOT EXISTS Categories (
cat_id INTEGER PRIMARY KEY,
cat_name TEXT,
cat_score INTEGER)";
$questions = "CREATE TABLE IF NOT EXISTS Questions (
question_id INTEGER PRIMARY KEY,
question_body TEXT,
question_picture TEXT,
question_cat_id INTEGER,
question_test_id INTEGER,
question_number INTEGER,
answer1 TEXT,
answer2 TEXT,
answer3 TEXT,
correct_answer1 TEXT,
correct_answer2 TEXT,
correct_answer3 TEXT)";
Answer the question
In order to leave comments, you need to log in
in general, I decided that there is a sqlite browser program there is an export to json
and each table is saved in a separate file as an array.
in general, we load each file and work with arrays
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question