0

How can I save to my mysql db an array from flash? I pass the array as a parameter to a php script. What I have to do next?

1 Answer 1

1

Many options here, simplist is as follows:

  1. Connect to db
  2. searialize array and store in db

http://php.net/manual/en/function.serialize.php - This will convert the array in a string, which can be unserialized later.

Sign up to request clarification or add additional context in comments.

4 Comments

OK I've serialized my array and entered it into my database. I am using now unserialize but it returns nothing....
not sure, this is such a good idea to use and SQL data store like this. On the other hand, SQL is both static and outdated. I'd suggest using MongoDB, where this can be achieved in a much simpler and more intuitive way and, more importantly: without a hack.
MYSQL is all I have so I'm stuck with it. This unserialize problem is driving me crazy though...
@chchrist: are you sure the array is properly sent to php? what do you get if you var_dump it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.