geekshubh
553
14
Vue

Retrieve username based on id in users table

Posted 1 year ago by geekshubh

I have two tables, one is "classroom" and other is "users" The classroom table has following field:- 'teacher_id(foreign key from 'id')' which contains a json encoded list of id from "users" table "id" column meaning there can be multiple teachers for same classroom. Now the question is that how do I retrieve the names of the teachers based on their teacher_id/id from users table and show them in a table on the main page.Want to make this work using vue component in a table format. Please help I am a newbie.

Please sign in or create an account to participate in this conversation.