Sql problem
William Prothero
waprothero at gmail.com
Sun May 21 20:23:05 EDT 2017
Whoops, I lied.
The data is stored incorrectly in the simulator too.
Hmm….
The IDE stores it correctly. There is something in the encoding that I’m missing.
Bill
> On May 21, 2017, at 5:03 PM, William Prothero via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Folks:
> I have an app that stores data to a mysql database on my server. It works fine in the IDE and in the iPhone simulator. However, when I load the app onto the iPhone, the saved data is corrupted.
>
> I am saving an array. The array is saved in a big string that has been base64 encoded.
>
> When saving, I do:
>
> put arrayEncode(tArray) into tData
>
> put base64encode(tData) into xData
>
> put urlEncode(xData) into xData
>
> xData is sent to the db
>
> When I read back the data, I do the inverse:
>
> urlDecode
> base64Decode
> arrayDecode
>
> The base64 data on the db is different when I store it from the iPhone. I can see this with Navicat, which I use for db management. So, the problem is in the storing of the data.
>
> What the heck? I am just using a post command to a php script that writes to the db.
>
> Why would the iPhone data that is sent be different from that sent in the simulator?
>
> Mac OSX 10.12.4, Livecode 8.1.4 (rc2) and XCode 8.3.
>
> Any suggestions would be welcome.
> Thanks,
> Bill P.
>
> William A. Prothero
> http://earthlearningsolution.org/
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list