Hi Bubblers!
How do we go about updating data to a MySQL database?
All I’m trying to achieve above is change someone’s callsign, but I get the below error, any help?
Hi Bubblers!
How do we go about updating data to a MySQL database?
Please someone must know?
Also, you need to have kind of the next query:
UPDATE table_name
SET "column1" = $1
WHERE "id" = $2;
Without specifying which record you need to update, you will update all of them.
Link:
https://www.tutorialspoint.com/sql/sql-update-query.htm
Hi,
Although in the mySQL database, it does exist?
Try to replace ” with ".
I’ve updated my comment:
That broke all of it changing that
Can you paste a screenshot of your current query, please?
yes, please
does this work?
Nope. It’s a preview link.
change it to:
UPDATE department_members
SET "callsign" = $1
WHERE "userID" = $2;
The quotes should be ".
Using your quotes, it causes everything to break, I think it’s a keyboard thing?
When I use mine, I get the below screenshot;
I have changed perms in my app, you should be able to access the editor via that link above?
Thanks for providing the access.
The next one works:
UPDATE department_members
SET `callsign` = callsign
WHERE `userID` = userID;
So, `` these for column names.
I see that we cannot use $ as variables. We need to type the names of the added parameters.
You are a star! Thank you very much! Appreciate the help you’ve given me!
Have you tested it out via workflows to ensure if that works?
I’ll do a quick mockup of it now, standby
Ah, it isn’t actually updating the value on the MySQL datbase