guyfromnola
New Member
I'm having trouble getting this off the ground. Maybe someone can shed some light. I'll analogize my concept/design/needs to something more basic to make it a little easier to follow:
List - LIBRARY
List - LIBRARIANS
List - BOOKS
There are one or more libraries in the city. There are one or more librarians at each library. There are books added by each librarian.
My current setup uses a plugin to create a Joomla user account when a librarian is added to a library by the Joomla site admin. Librarians would then be able to login with their own account and add books to the book list. Based on a database join between the library list id and the librarian list id, when a book is added by a librarian, it should allow for that book to be able to be viewed when viewing the books listed filtered by library, or further filtered by librarian.
The dilemma I am presented with is, when a book is being added by a librarian, to have it (possibly in a hidden fashion) linked to the particular library, which is based off of the library that the librarian is assigned to. My thought was to create another database join between the librarian and the book, but it only generates errors when trying to even view the list before being able to add any books.
As an admin, I should be able to view the master list (LIBRARY), see the joined list (LIBRARIANS), and then see the list of books in the entire library or by filtered list of librarian.
Although it may seem counter-intuitive to a real-life scenario, for the sake of this analogy, librarians, when viewing the book list, should be able to see only books in their library, along with which librarian is tied to each book entry. Furthermore, if simple enough to implement, librarians should be able to view all books, but only able to edit those that were added by them.
I'm somewhat of a novice when it comes to database coding, but I tend to learn better by example and I cannot find something in laymen terms that would help me understand how to implement this design. Any insight or assistance is very much appreciated. I'd be happy to elaborate on this scenario, if needed. Thanks!
List - LIBRARY
List - LIBRARIANS
List - BOOKS
There are one or more libraries in the city. There are one or more librarians at each library. There are books added by each librarian.
My current setup uses a plugin to create a Joomla user account when a librarian is added to a library by the Joomla site admin. Librarians would then be able to login with their own account and add books to the book list. Based on a database join between the library list id and the librarian list id, when a book is added by a librarian, it should allow for that book to be able to be viewed when viewing the books listed filtered by library, or further filtered by librarian.
The dilemma I am presented with is, when a book is being added by a librarian, to have it (possibly in a hidden fashion) linked to the particular library, which is based off of the library that the librarian is assigned to. My thought was to create another database join between the librarian and the book, but it only generates errors when trying to even view the list before being able to add any books.
As an admin, I should be able to view the master list (LIBRARY), see the joined list (LIBRARIANS), and then see the list of books in the entire library or by filtered list of librarian.
Although it may seem counter-intuitive to a real-life scenario, for the sake of this analogy, librarians, when viewing the book list, should be able to see only books in their library, along with which librarian is tied to each book entry. Furthermore, if simple enough to implement, librarians should be able to view all books, but only able to edit those that were added by them.
I'm somewhat of a novice when it comes to database coding, but I tend to learn better by example and I cannot find something in laymen terms that would help me understand how to implement this design. Any insight or assistance is very much appreciated. I'd be happy to elaborate on this scenario, if needed. Thanks!