Has anyone had any issues with Database UPDATE inside a Modal? i just can’t get it to update the MySQL DB. There are no errors being thrown in either the browser or Apache error log files.
I am sure it is something simple.
Having the same problem with both Wappler 1.7.1 and 1.7.2 so it has nothing to do with Wappler update.
What exactly are the issues you have with the dB update? Does the form submits to the server action? Does it includes all the data? Any errors in the server action - you can check all this in the devtools
@ben Thanks for the suggestion, I capitalised the “ID” in three instances as you suggested but made no difference. Always worth a go. I have included my action in case you see anything wrong.
Hi @George, thanks for the questions and so here are some screenshots. I suspect that the form is not getting submitted to the server action as shown by the last screenshot (I think that’s what it shows). There are no errors and I seem to be getting status 200 (OK) but no Preview/Response from user_update.php (which is the server action file).
I am not 100% knowledgeable with DevTools and so please feel free to treat me like a novice. This is all on my local machine. Obviously if you need any further info or screenshots then please ask/guide me as to what you want. Cheers
Back to the issue, I had the same symptoms, the form submitted successfully, nice little notification telling me so, yet no change in the database. I changed everything to lower case and the result felt like I was climaxing.
Yaay! Thanks @Ben, I have changed all database fields to lowercase, then did a search and replace on all “_ID” to make them all “_id” (which was the only capitalisation I had) on the php files and in all the dmxConnect files. Once EVERYTHING to do with database fields names were lowercase I then tested and voila! It worked as expected. I am a happy bunny again
@George is this expected?
Should everything related to database field names be lowercase?
If so, then I think you should advise people.
If not, then do you need to make a change to the system so as not to be case sensitive?
It doesn’t need to be all lowercase for POST vars. Lowercase is only required for GET vars, but server connect automatically makes them lowercase when required.
I think you just had different text case somewhere that didn’t match.
Thanks @Teodor, you may well be right with a mismatch somewhere. It is no hardship for me to keep everything lowercase from now on, it will keep things simple.
And thanks @ben for pointing me in the right direction. As Teodor says, it was probably a mismatch rather than a need for lowercase. Anyway, thanks again and now for some breakfast. 6:55am it’s a nice warm 3°C at the moment and there’s no frost this morning