PDA

View Full Version : Server/database interaction in C++ using sockets


wyrmmage
2007.01.13, 08:45 PM
Well, I'm working on the multiplayer part of my game now, and I've gotten the server to the point that it will accept connections and receive and send data from and to the client. It seems that the next logical step would be to access a database and withdraw information so that I can make a login screen that works :)
How would I go about searching a database from a server and getting the information that I want? I'm pretty good at PHP, so I know most of the general information about connecting to a database and withdrawing information from it (I always used MySQL databases).
The server is written in C++ and uses the WinSock library, but the client is made for Windows and the Mac (or will be made for the mac, I'm still working on that...)
Any links or help would be appreciated :)
Thanks,
-wyrmmage

OneSadCookie
2007.01.13, 09:43 PM
If you're using a MySQL database, you'll be using the MySQL API to connect to your database and send queries. I'd suggest reading their documentation.

wyrmmage
2007.01.20, 04:17 PM
Thank you :) I've found it and am experimenting on using MySQL++
-wyrmmage