Database is like:
table book: book_id, title
table wrote: book_id, author_id, author_order
table author: author_id, author_name
Every book is written by several person and have author_order.
I need to output using c program like:
book_id
authors: author1, author2, ... , authork
title
Now I’m using a cursor to fetch the book_id and title, but how to get all the authors who wrote a book?
Your data model is pretty straightforward, all I would think you would need is a join from author to wrote to book.