I'm encountering an issue with storing an array in MySQL using Wappler, and I'm hoping someone can help me figure out how to store the array as [1, 8, 9] instead of ["1", "8", "9"].
In my first project, I have an input field and I'm using a variable $_POST.tags (classified as text, getting Tagify values). I then have a set value valarray = $_POST.tags.split(','), and finally, I have a database insert with a JSON field where I insert {{valarray}}. This setup works perfectly, and it stores the values as [1, 8, 9].
However, when I replicated the same setup on a different website, it inserts the values as ["1", "8", "9"]. Since everything seems to be identical between the two projects, I'm unsure what could be causing this difference.
Can someone please provide suggestions or insights on how I can ensure the values are stored as [1, 8, 9]?
In the previous version of the site, which was an MVP, I used the Tagify component and the server connect saved the data as an array of numbers, like this: [1, 9, 89, 245]. However, when developing the production version of the website, the same server connect (created exactly as the first one) saves the array as text, like this: ["1", "67"].
I want to understand first why there is a difference in the data formats between the two versions and then how this might affect queries where JSON_CONTAINS is used.
If you says that I can go with IDs saved in the array as a text, I can go..
In the old version of the site, the server connect saved the array elements as numbers. However, in the current version, it saves them as text. I don't know if I upgraded something..