Get KoolPHP UI with 30% OFF!

Tree data from database

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 -
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 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 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 , edited Apr 3 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 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 Kool