Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Records not showing in browse forms

Questions related to using nuBuilder Forte.
Post Reply
Lala
Posts: 43
Joined: Thu Nov 07, 2024 11:46 pm
Has thanked: 10 times
Been thanked: 4 times

Records not showing in browse forms

Unread post by Lala »

Hi, some of my records aren't showing up in the browse forms - it seems to be random whether they are or not. They are in the database - I checked on phpMyAdmin. A specific example of this is in the patients table, registry no 2025-23. Just to add to the issue, I can't attach a backup file to this as I get a message saying it is the wrong file-type being .sql - solved by zipping the file
You do not have the required permissions to view the files attached to this post.
Lala
Posts: 43
Joined: Thu Nov 07, 2024 11:46 pm
Has thanked: 10 times
Been thanked: 4 times

Re: Records not showing in browse forms

Unread post by Lala »

I've discovered it only applies to 8 records so I have decided to delete them and re-enter them. It has something to do with making a unique index on the registration numbers - which I've removed now
steven
Posts: 412
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 58 times
Been thanked: 55 times

Re: Records not showing in browse forms

Unread post by steven »

Hi Lala,

The reason for some records not appearing is because not all of your patients have a treatment.

A normal SQL JOIN returns only records that match...

Code: Select all

SELECT
 patients.*,
    treatments.*

FROM
    patients
        JOIN treatments ON patients.patients_id = treatments.tx_pat_id

But if you replace JOIN with LEFT JOIN you'll get back all patients even if they don't have a matching treatment.

Code: Select all

SELECT
 patients.*,
    treatments.*

FROM
    patients
        LEFT JOIN treatments ON patients.patients_id = treatments.tx_pat_id

eg.

left.png


Steven
You do not have the required permissions to view the files attached to this post.
A short post is a good post.
Buy Kev a Coffee
Post Reply