I have two tables Courses and Batches
Courses fields are
Batches Field are
How I can make relations in both the models
Can any one help me…
if you are talking about AR models, this will help you.
you learn much more if you try to do it yourself cause it is a really easy task.
The Working with Databases: Relational Active Record topic in the guide should help you out.
Look at the relation between tbl_user and tbl_post tables, it’s like in your example.
If you don’t be able to do it ask again and I or somebody else will help you but first try it yourself