Hi ,
I am having a problem here and cannot find a quick solution.
I have created a project, set up xampp, everything is working fine. I have now added a new table to my project, saved the code and generated the php, but how can I have the changes in AppGini to reflect in my database please? I am in phpmyadmin and the new table is not being added.
Thanks,
Ben
Cannot update database
Re: Cannot update database
Problem solved.
I installed Xampp with all it's modules9phpmyadmin, mysql, apache...) I then created a user(not root), unfortunately, this user did not have all the required privileges, when I changed it to "Root user", the AppGini script was able to write to the database all the previous changes.
Ben
I installed Xampp with all it's modules9phpmyadmin, mysql, apache...) I then created a user(not root), unfortunately, this user did not have all the required privileges, when I changed it to "Root user", the AppGini script was able to write to the database all the previous changes.
Ben
Re: Cannot update database
Hi all,
i do have the same problem. Using XAMPP. I have modified the structure (added a field in a table and changed a propertie in another filed. Recreated the script files, replaced them in htdocs directory but the structure wont change. It still remains the same. What i am doing wrong. Just testing and using root account.
I am using the free version until now for testing but the files are reacreated so this should work for my understanding. Any help will be appreciated.
thanks and best regards
Kai
i do have the same problem. Using XAMPP. I have modified the structure (added a field in a table and changed a propertie in another filed. Recreated the script files, replaced them in htdocs directory but the structure wont change. It still remains the same. What i am doing wrong. Just testing and using root account.
I am using the free version until now for testing but the files are reacreated so this should work for my understanding. Any help will be appreciated.
thanks and best regards
Kai
Re: Cannot update database
G'day Kai. There's a pesky little file in your script root called setup.php. Delete it and recompile. That should update the scripts. Please try that first.
I'm not sure how brilliant the MYSQL update command is. Adding a new table is okay, but adding a field to an existing table could be a bit hit and miss. Recompile the script, then use PHPMyAdmin to see if the field has been added. You may have to do it manually if your database contains working data.
The forum's gone to sleep this week. maybe someone with more knowledge can help when they all wake up.
I don't think the problem is with XAMPP or AppGini, or maybe your browser. I'm more inclined to think it's to do with MYSQL, but don't forget to clear your browser cache and use the browser refresh button often!
I'm not sure how brilliant the MYSQL update command is. Adding a new table is okay, but adding a field to an existing table could be a bit hit and miss. Recompile the script, then use PHPMyAdmin to see if the field has been added. You may have to do it manually if your database contains working data.
The forum's gone to sleep this week. maybe someone with more knowledge can help when they all wake up.
I don't think the problem is with XAMPP or AppGini, or maybe your browser. I'm more inclined to think it's to do with MYSQL, but don't forget to clear your browser cache and use the browser refresh button often!
Re: Cannot update database
John,
despite i have already deleted "all" files (as far as i remember) i just deleted the setup.php, recompiled and after reconnecting to the mssql database everything looks fine.
I think i should spend the money and give it a try. Looks fine.
Thank you so much, appreciate your help!!
regards
Kai
despite i have already deleted "all" files (as far as i remember) i just deleted the setup.php, recompiled and after reconnecting to the mssql database everything looks fine.
I think i should spend the money and give it a try. Looks fine.
Thank you so much, appreciate your help!!
regards
Kai
Re: Cannot update database
Kai, it will be money well spent. I think Ahamad may begin adding many new features now that he has a forum where he can communicate with his users.
I don't look into the workings of AppGini, but I think if you do a "Full" compile, over an older one, AppGini doesn't update setup.php. You have to physically remove it yourself or the old version will be kept. Bug? I don't know.
Regards,
John
I don't look into the workings of AppGini, but I think if you do a "Full" compile, over an older one, AppGini doesn't update setup.php. You have to physically remove it yourself or the old version will be kept. Bug? I don't know.
Regards,
John
Re: Cannot update database
This has been tricky for me as well. Adding a table is usually ok but adding a field gets messy. Especially, re-ordering fields is a surely asking for trouble. Sorry for not having a solution.
Re: Cannot update database
Adding a table shouldn't pose any problems. It's just a MYSQL command "Create table if not exists" which AppGini will execute. Ditto adding a field. AppGini should add the field okay, but as the table exists you will probably need to delete setup.php. As I said, I haven't delved into the why's and wherefore's of AppGini, but it seems the script WON'T try to update the database while setup.php exists in your script folder. Until setup.exe is removed, AppGini will try to use the original database even when the script has been recompiled.
Changing the field order is an AppGini function and has nothing to do with MYSQL. The database fields can be in any order according to which ones you want at, or near the top in your data view.
I think you need to figure out (or understand) what affects the MYSQL database and what is done in the AppGini script. Adding a table or field and changing keys affects the database. Everything else is done by AppGini and providing AppGini allows you to do it, there shouldn't be a problem.
Just remember to clear your browser cache, or at least use the browser refresh button. You see Ahmad doing the latter ALL the time in his video demos.
Changing the field order is an AppGini function and has nothing to do with MYSQL. The database fields can be in any order according to which ones you want at, or near the top in your data view.
I think you need to figure out (or understand) what affects the MYSQL database and what is done in the AppGini script. Adding a table or field and changing keys affects the database. Everything else is done by AppGini and providing AppGini allows you to do it, there shouldn't be a problem.
Just remember to clear your browser cache, or at least use the browser refresh button. You see Ahmad doing the latter ALL the time in his video demos.
Re: Cannot update database
i used to delete setup.md5 as well
Re: Cannot update database
You'll find your regenerated AppGini files contains an updateDB.php
If you've created any new tables/fields or edited any existing, that file contains the relevant SQL commands to make the changes to the database
You may need to delete the stepup.md5, then just navigate to the index (or setup.php) page, connect to your database and the updateDB.php script will make any changes required.
Hope that helps
If you've created any new tables/fields or edited any existing, that file contains the relevant SQL commands to make the changes to the database
You may need to delete the stepup.md5, then just navigate to the index (or setup.php) page, connect to your database and the updateDB.php script will make any changes required.
Hope that helps
Re: Cannot update database
The folder where you saved the entire file.. just empty it into the trash and then hit your magic wand in app gini again and reload it, then zip and upload to your server and all should be well.
Tina O'Connell
Web Dev & Appgini FAN
Web Dev & Appgini FAN