hi everyone, I'm wanting to make a simple blogging system, where a user can create their own blog.

But I also want a user to be able to create multiple blogs. This means that one person can have many blogs and also many people can have one blog. I'm wondering the best way to store this information in the database. I'm thinking one big table for all the posts, but how can I map a specific post to the specific blog of a specific user?

I thought about using something like how wordpress uses table prefix, but that requires that I make my queries dynamically and all my research says this is a bad idea. but then how am I supposed to implement this?

can this be done in one database?

thanks
-SelArom

ever heard of foreign keys?
Look into that, all you really need is a reference to the table containing the information about a blog in the table containing information about the entries.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.