Current SQL query string:
"SELECT verses.book_name, verses.verse_id, verses.verse_category, verses.verse_testament, verses.verse_reference_chapter, verses.verse_content, verses.verse_enabled,
books.book_name, books.book_id, books.book_author, books.book_testament, books.book_summary, books.book_summary_clue, books.book_number
FROM verses
RIGHT JOIN books
ON verses.book_name = books.book_name
WHERE verses.verse_enabled = 1
ORDER BY rand() LIMIT 3";
A book may have many verses. The above query may return multiple different verses from the same book. This means the results may contain duplicated books, dont want this - book has to be distinct.
How would I still return all of the current column data from the tables, but only show distinct books in the 3 results?
I realise I dont need to list all those fields in the SELECT also, which ones can I take out?
Thanks