Skip to main content

11.3 - Verify the Database

Last updated 20/05/2025

If you want to check the date borrowed in the BorrowHistory table in the database without having to create a menu for the BorrowHistory table, you can use Five's SQL Editor.

1. Click Data in the menu.

2. Click Queries in the sub-menu.


Queries menu item
Figure 1 - Queries menu item

Check the Record in the Database

1. Click the Add Item button.

2. Click in the Query field to open Five's Query Builder.


Query field
Figure 2 - Query field

3. Click the SQL tab.


SQL tab
Figure 3 - SQL tab

4. Copy the syntax below and paste it in the SQL Editor.

MySQL
Returning results for borrowing history
SELECT
Book.Title,
Book.BookKey,
Book.BorrowMemberKey,
BorrowHistory.Date,
BorrowHistory.DateReturned,
iUser1.FullName AS Owner,
iUser2.FullName AS Borrower
FROM
Book
INNER JOIN BorrowHistory ON Book.BookKey = BorrowHistory.BookKey
INNER JOIN iUser AS iUser1 ON Book.MemberKey = iUser1.iUserKey
INNER JOIN iUser AS iUser2 ON Book.BorrowMemberKey = iUser2.iUserKey
WHERE Book.Title LIKE '%Mastering%'


5. Click the Run button and scroll through the results until you see the Chelsea and Rick record.


Chelsea and Rick record
Figure 4 - Chelsea and Rick record