Inner Join and Edit Limits
-
I think this came up before, but a search found nothing. I can INNER JOIN two tables, but it throws my results to 0. This is only when I have the option to limit a user to edit their own data checked. The limit always works and the JOIN works, but no matter what I do or have tried, it will not show the limited data anymore when done together.
I can see all the rows in the Admin area, but that is no help. I thought maybe I can add a WHERE clause in the SQL source in WPDATA where the MYSQL Table User ID = WP Userid. That though is mimicking the EDIT LIMIT function.
Any ideas, is this another JS or JQuery code to be added over here? I hope not. An INNER JOIN should not nix the data. I made sure all tables in the RDBMS relationship for that Foreign Key have all the same name and value.
Here is the example: I have a table for a client function like Power of Attorney (POA), it contains the client ID and this ID is the FK to the main table for each client, but the user needs their last name. The last name is on a main client table and the SQL is pulling in all the client POA recs and the Last Name when I do the INNER JOIN without the EDIT LIMIT on.
I have each record with a WP UserID so using the EDIT LIMIT function, only the recs shows up for the user. It is when I put in the INNER JOIN, the recs showed “No Records Found”. I tested the INNER JOIN and without the EDIT LIMIT turned on, the results did bring in the proper Last Name to each POA record output.
- The topic ‘Inner Join and Edit Limits’ is closed to new replies.