This topic is locked
[SOLVED]

Foreign Key to Same Table

12/6/2022 4:11:22 PM
PHPRunner General questions
J
jaffleck author

Does PHPRunner support a table where a record contains a foreign key to another record in the same table? The detail link does not appear in the list page.

I'm running x64 version 10.8 Build 39925

admin 12/6/2022

Create a custom view for the same table and link the main table with this custom view as master-details.

J
jaffleck author 12/10/2022

Thanks. This works.

fhumanes 12/10/2022

Hello,

This solution works if there is only one dependency or a recursion level of 1, but if it has more levels, I have not been able to make it work.

For example, if we have directories that depend on directories and that in turn have more directories, that is, it has 2 or more levels of dependence, that relationship of the different levels does not find that it is seen on a screen.

Cheers,
fernando

dageciDevClub member 12/11/2022

I'm also thinking about that how to solve this in PHPRunner.
Still didn't come to this part in the project that I'm working on, but when the time comes I will try with some of the solutions from one article (answers) from stackoverflow. Here is the link if someone else would find some of the ansers helpfull and if you have the time to try it out. Maybe if you find the solution that would work in PHPRunner could share with us?

Here is this article (answers) from Stackoverflow:
https://stackoverflow.com/questions/20215744/how-to-create-a-mysql-hierarchical-recursive-query

fhumanes 12/12/2022

Hello,

In the last example that I have published "I have solved" the problem of the addresses deepening one by one and facilitating "a trace of crumbs", so that it can be uploaded to any level of directory that you have already passed.

https://fhumanes.com/blog/sistema-de-archivo-de-documentos-electronicos-edas2/

But I understand that this can be a solution, but for me it is not the best.

Cheers,
fernando