1. Fabrik 3.7 is now available. This version contains critical security updates, please update as soon as possible. Please remember to backup your site before updating, we also recommend testing your updates on development sites if possible.

Help with data list

Discussion in 'Professional Support' started by coloradodv, Apr 18, 2017.

  1. coloradodv

    coloradodv New Member

    Level: Professional
    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?
     

    Attached Files:

    • join.pdf
      File size:
      135.5 KB
      Views:
      29
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Supporter
    Apologies for the delay, I missed this post.

    Put your access details in http://fabrikar.com/you/my-sites

    For now I just need super admin backend access, don't need ftp or phpMyAdmin.

    -- hugh
     
  3. coloradodv

    coloradodv New Member

    Level: Professional
    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!
     
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Supporter
    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
     
  5. coloradodv

    coloradodv New Member

    Level: Professional
    Thanks - I super appreciate it!
     
  6. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Supporter
    Looking now.

    --hugh
     
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Supporter
    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
     
  8. coloradodv

    coloradodv New Member

    Level: Professional
    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.
     

    Attached Files:

  9. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Supporter
    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
     
  10. coloradodv

    coloradodv New Member

    Level: Professional
    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.
     
  11. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Supporter
    I'm available for custom work on an hourly basis.

    -- hugh
     

Share This Page