• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Help with data list

coloradodv

New Member
I have this data list setup, however, it is displaying other users mixed in with every user.

I attached images of my join, but the data from user "a" is showing up on every user who is signed up for the course that the test results come from.

Can you login and help me understand what I missed? I just upgraded my support. Where do I give you access info?
 

Attachments

  • join.pdf
    135.5 KB · Views: 38
Thanks Hugh

The view in the datalist not labled test, is what I am having problems with. It is pulling records from other users.

The elements shown, are the one I need to export, but it seems if any user is subscribed to that course, the test results for everyone are showing up, or at least a few of them repeating, and showing up weather they took the test or not.

There are 4 tables that I have to get the data from, so you will see which tables, You can see my join fields in the pdf.

I have tried for hours to get it to give me the correct data.

Thank you for the help. I need to learn this better, I love the capabilities!
 
OK. I'm not at my computer atm, but I'll take a look as soon as I get home.


Sent from my HTC6545LVW using Tapatalk
 
I'm not entirely sure from your description, but I think the issue is that the join to the 'courses' table needs to be an "INNER" not a "LEFT" join.

In MySQL, when you join two tables, like ...

SELECT * FROM table1 LEFT JOIN table2 ON table1.id = table2.table1_id

... using a LEFT JOIN, you'll get a row returned in the selected set for every row in table1, regardless of whether there is a "matching" row in table2. In cases where there isn't a matching row for table2, the table2 data in the returned rows will just be blank.

If you only want to return rows where there are results from both tables, so only table1 rows with a coresponding table2 row ....

SELECT * FROM table1 INNER JOIN table2 ON table1.table2_id = table2.id

... using INNER rather than LEFT.

Think of it as a Venn diagram, where the two circles are the two tables - left circle is table1, right circle is table2, and the overlap is where there are corresponding rows in both tables. A "left join" returns the left circle (and overlap). A "right join" returns only the right circle (and overlap). An "inner join" returns only the overlap.

I changed your join to be INNER. Which has changed the results - let me know if it's what you need.

-- hugh
 
Thanks Hugh...

It isn't working right still.

The first loop I have identified is in this image, for every user signed up for this course that has signed up for course id 19 - is registering the score for the exam taken by user 1097 that has actually taken the final exam.

I haven't verified any more data being misplaced cause I have not looked, but as you can see in the image, the test score 71 and 51 are confirmed as coming from user 1097 - as he is the only one who scored this on the final exam.

Do I need to do another inner join? I have tried several combinations on my test list, and I cannot seem to get it to work.

on a personal note I noticed your thumbnail of a fusion - is this your neck? I had this same xray from my neck, however I had my hardware removed, my titanium plate was cracked in two. They went in to redo my entire fusion at c6,7 and found out my neck was fused solid, so they just removed the plates and screws. Your image brought me back some memories man!

Thanks for your help.
 

Attachments

  • test.jpg
    test.jpg
    43.8 KB · Views: 29
Yup, ACDF on T7-T8, from about two years ago, for a herniated disc. A few months before that I had a three level surgery on my lower back, S1 through L3.

I'll take another look later this evening / tomorrow.

Sent from my HTC6545LVW using Tapatalk
 
Healing for you man! I can identify a little. I had my right SI joint fused as well in 2013 but I think it is my lower back cause it still kills.

I think I finally got it, not like I want it, I need data from 1 more table, but when I do it shows too much data. For now I think I can have the client get what they need. Are there any coders for hire to help with any future projects. I am working on a bigger database, and would be a good help to have a Fabrik pro to assist.

Thanks for your support. we can close this, I couldn't see where to close it.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top