Jump to content

Insert PHP class object into MySQL database?


hlstriker

Recommended Posts

I'm wondering if it's possible to store a class object into a MySQL database?

 

If this is possible to do, would it be better to store the class object itself - or - would it be better to store each variable in the class, and rebuild the object on retrieval?

Link to comment
Share on other sites

You can try serealize(), but that's generally a bad idea.

 

Another option - few months ago, i came across a project, it was a layer between PHP and MYSQL that allowed this to happen. Don't remember what it was called, maybe google can help =)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.