title: How do you serialize a struct and store it in a MySQL database?
body: <p>I am using C++ for an online game server project and I need to store some structs as binary blobs in a MySQL database. I am using RakNet for networking and have tried using its BitStream class to serialize the data but I don't know how to do it right. My question is, how do you turn a structure into a stream of bytes that you can pass into a MySQL database blob with an insert/update query? I am using the MySQL C libraries that come with the MySQL server download.</p>