• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Simple SQL redux :)

Al Neri

Diamond Member
Im looking to write a query. Who's read what book (by reader) and who's read what book (by book)

Here's a description of my tables http://www.javadimension.com/mysql.JPG

little help? I tried,

SELECT bookname, firstname FROM firstname, books, booksread WHERE books.bookid=1 AND firstname.firstnameid=booksread.firstnameid ORDER by bookname asc

to see who read catch22 but no dice........

it results:

Catch 22 Mike
Catch 22 Mike
Catch 22 Mike
Catch 22 Bob
Catch 22 Bob
Catch 22 Taco
Catch 22 Sam
Catch 22 Sam

Thanks !
Don R.
 
Close ... you need one more JOIN

SELECT bookname, firstname FROM firstname, books, booksread WHERE books.bookid=1 AND firstname.firstnameid=booksread.firstnameid AND books.bookid = booksread.bookid ORDER by bookname asc
 
Back
Top