echo "QCOLS|".implode(',', array_map(fn($c)=>$c->Field, DB::select('describe questions')))."\n"; foreach (DB::select("show tables like '%hint%'") as $t) { $k=array_keys((array)$t)[0]; $n=$t->$k; echo "HINTTBL|$n|".implode(',', array_map(fn($c)=>$c->Field, DB::select("describe `$n`")))."\n"; } echo "SAMPLE|".json_encode(DB::table('questions')->where('source','like','ACS 2022 P1 Test 1%')->first(['id','type_id','question','answer0','answer1','answer2','answer3','correct_answer','skill_id','difficulty_id','explanation','qa_status','status_id','source','question_image','user_id']))."\n";