B4J Question Code works in one project, but not in another.

LWGShane

Well-Known Member
Licensed User
Longtime User
I have two pieces of code, each using the same code.

In my "PHPTest" project, it works as intended. (Serializing an object). However, in my KVS 3.0 project, it just returns the un-readable bytes.

Any ideas on why I can't serialize a MySQL entry but I can serialize an object in the exact same way?

Edit 1: I should add that I use "USB Webserver" as my local server. (http://www.usbwebserver.net/en/) with the MySQL PHP code provided by @Erel.

Edit 2: Uploaded the right UniverseCore Zip.
 

Attachments

  • PHPTest.zip
    1.1 KB · Views: 227
  • OpenLibX.zip
    38.3 KB · Views: 231
  • UniverseCore.zip
    8 KB · Views: 240
Last edited:

Harris

Expert
Licensed User
Longtime User
The PHP code from the MySQL tutorial doesn't support blobs. Why use PHP at all? It will be trivial to implement it with RDC.
I avoid PHP at all costs (after dealing with this for many years). With B4X, PHP is yesterday's technology. You don't need the complication and frustration.
With data from Sq Lite (to and from your mobile DB) - use RDC. For other files, png, text, binary and such - use other such transfers in B4X.

Also, blobs are very problematic - when large in number and size. Store files to disk (using location / file name in fields) in DB tables.

My 2 cents, after going round and round - until these good folks set me in the right direction.
 
Upvote 0
Top