Can I get the data for my tree from database tables (e.g. MySQL)?
How do I do this?
Thanks - Rowan
Rowan | |
Can I get the data for my tree from database tables (e.g. MySQL)?
How do I do this? Thanks - Rowan
Posted Mar 22, 2016
Kool
|
|
Anthony Amolochitis | |
Check out this topic. It will probably help you.
http://demo.koolphp.net/Examples/KoolTreeView/Advances/State_Persistent_With_Database/index.php
Posted Mar 24, 2016
Kool
|
|
Rowan | |
Thanks for this. I will read this and try to understand the code, and if I succeed, try it.
Rowan
Posted Mar 24, 2016
Kool - 1 person likes this post
|
|
SANTIAGO | |
Hi.
Dont work i try but dont fill data in db if I press the f5 key everything goes back to how it was
Posted Apr 2, 2019
Kool
|
|
Anthony Amolochitis | |
I don't think it will work online because you can't have to whole world change it, but I've made it work locally to test.
It works great.
Posted Apr 2, 2019
Kool
|
|
SANTIAGO | |
I just installed version 8.9 on my localhost and believe me, it does not interact with the database.
when i press f5, all changes are deleted Examples/KoolTreeView/Advances/State_Persistent_With_Database/index.php
Posted Apr 3, 2019 , edited Apr 3, 2019
Kool
|
|
Andrew | |
Hi I have just installed this and while it is getting data from the Mysql database (and I can add a node in the database and it appears in the tree) it does not seem to be saving changes made on the web page back to the database. ie the insert/update/delete queries do not seem to be firing correctly.
Posted Jul 13, 2019
Kool
|
|
Anthony Amolochitis | |
Have you checked for any javascript errors? If you have issues with Koolajax, you can always use the standard ajax to post your events back.
You can create a small php script for each event. In each script, the database will be altered on call, then you can return a json encoded object to describe the changed directory/file. Addfolder.php DeleteFolder.php EditFolder.php AddFile.php DeleteFile.php EditFile.php Then have the events for the KoolTree fire a javascript event. Register Events are here : https://doc.koolphp.net/Controls/KoolTreeView/Javascript/KoolTreeView_Class/index.php#registerEvent Just create a javascript object to manage methods on the front end. Then the registered events can call the methods. Hope this helps.
Posted Jul 13, 2019
Kool
|
|
Ken | |
This sounds pretty terrible. It seems like the idea of buying a component like a TreeView is that it works.
I am coming at this as a Business Analyst, and looking for working solutions, in this case for list management. Should I expect this to work right out of the box? If not, what's it take?
Posted Dec 7, 2019
Kool
|
|
Anthony Amolochitis | |
I've been using it for about 10 years. It worked out of the box for me. But it allows for customization too. I still use it today.
Posted Dec 8, 2019
Kool
|
|
Ken | |
Thanks, Anthony. I was imprecise..."Works" means like the OP suggested, two ways, from and TO the database - That is the part that one would typically expect to be functional in a commercial component, but which requires the coding that you described?
Posted Dec 8, 2019
Kool
|
|
Anthony Amolochitis | |
Is there a product that you know of that works as you suggested? Maybe I can check it out.
Posted Dec 8, 2019
Kool
|
|
Ken | |
It's not easy to find, Anthony. I spend almost a full day yesterday looking at UI widgets and database management strategies for this issue.
The best I have at this time is https://demos.krajee.com/tree-manager-demo/tree-view, which is a fairly "invasive" solution, requiring a specfic PHP framework and database structure. A more general solution seems to be https://coderwall.com/p/z00-yw/use-ltreee-plv8-to-fetch-hirarcical-records-as-json and the article it back-references. Would love to know your thoughts.
Posted Dec 8, 2019
Kool
|
|
Anthony Amolochitis | |
In both of those libraries you would still need to setup a database on the server and use some type of database, or a json database , or actual file system. The KoolPHP UI makes it pretty simple. Simpler than most libraries. If you're looking for a UI that works with PHP, I would use KoolPHP. It doesn't need any external sources except what comes with it. It's so simple to setup and use. I haven't found any other library I like more that KoolPHP myself. If you utilize the Koolgrid to view hierarchical data, then that is pretty much automatic. It just works out of the box.
Posted Dec 9, 2019
Kool
|
|