Jump to content

Using MySQL for all content


scrubbicus

Recommended Posts

I'm trying to create a completely dynamic website and so I can create a search ability so I'm guessing putting all the content in MySQL will make it easier for me to be able to create a search function.

 

Anyway since all my content is in MySQL I'm trying to call classes in PHP within the MySQL area... and it's not working so I'm guessing MySQL doesn't support this?

Link to comment
Share on other sites

As far as I know, it doesn't.

But what you can do and it will work a similar way is to use php function serialize and store serialized object to mySql.

When reading from mySql use unserialize.

But. Best practice would be to use mySql as little as possible. You could store serialized objects into file system but should consider some security here.

 

Link to comment
Share on other sites

The following question is directed to both of you:

 

What???

 

 

scrubbicus: Explain what you mean by 'to call classes in PHP within the MySQL area'

 

gregor171: I have no idea what are you talking about? Why serializing? Why storing in plain file?

Link to comment
Share on other sites

Mchl, I believe scrubbicus wants everything dynamic as to store every bit of data in the DB, including PHP codes? (I think that's right). gregor171 suggested serializing class objects and storing them in DB and or flat file. Why the heck would someone serialize objects like that? ... I am not making sense. :D

 

Don't mind me. Please forgive me.

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.