Old 03-13-2008, 02:57 AM   #1 (permalink)
Banned
 
Join Date: Nov 2007
Posts: 1,169
Reputation: 20
Send a message via AIM to hackedx Send a message via MSN to hackedx
Default Mysql & C++

How does MYSQL and C++ work together? I understand how to use MYSQL to make database, tables, users, etc, but i don't understand how they work together? Whats the purpose of using C++ with MYSQL, what can you do. If you wanted to make an mmo using C++ would you be required to use MYSQL as a database to get players connected and sharing information? I'm just looking for a little help here ;x
hackedx is offline  
Old 03-14-2008, 03:49 AM   #2 (permalink)
Banned
 
Join Date: Dec 2007
Posts: 3,796
Reputation: 221
Default

My guess is it would be something along the lines of using a client made in C++ to connect to a MYSQL database or whatever, you pretty much answered your own question.

Last edited by Z0MBiE; 03-14-2008 at 05:07 AM.
Z0MBiE is offline  
Old 03-15-2008, 07:36 PM   #3 (permalink)
Marios's Mustache Wax
 
Join Date: Mar 2008
Location: US
Posts: 10
Reputation: 10
Default

Quote:
Originally Posted by hackedx View Post
How does MYSQL and C++ work together? I understand how to use MYSQL to make database, tables, users, etc, but i don't understand how they work together? Whats the purpose of using C++ with MYSQL, what can you do. If you wanted to make an mmo using C++ would you be required to use MYSQL as a database to get players connected and sharing information? I'm just looking for a little help here ;x
You would use C++ or PHP, etc. to programmatically insert, update, and select data from MySQL. If you plan on using C++ to gather data from MySQL, I'd check out the following documentation on C++ MySQL libs.

http://tangentsoft.net/mysql++/doc/

Also, if you built an mmo with C++ you don't necessarily have to use MySQL to store player info .. you could use text files, xml, etc. But MySQL would be a better choice.
__________________
[[ http://www.intelligentgear.com/ ]]

Intelligent Gear is a set of online turn based browser games designed for having
strategic fun in combative environments. Check out Gear Combat Arena, or Base Ship Commander.
smartgear is offline  
Old 04-01-2008, 06:23 PM   #4 (permalink)
Still learning the ropes
 
Glitch0r's Avatar
 
Join Date: Oct 2007
Posts: 25
Reputation: 10
Default

Quote:
Originally Posted by smartgear View Post
Also, if you built an mmo with C++ you don't necessarily have to use MySQL to store player info .. you could use text files, xml, etc. But MySQL would be a better choice.
True but try not to use text files, take too much space, and slow to mantain when mysql is very easy to maintain if you also code a cool script to do that also in C++.
__________________
Glitch0r is offline  
Old 04-02-2008, 02:12 PM   #5 (permalink)
Pikachu's Flea Collar
 
Join Date: Jun 2007
Location: UK
Posts: 51
Reputation: 10
Default

As mentioned earlier the reason you use C++ is to interact with the database. MySQL is basically a big file full of data that has a program that can quickly read out certain parts of that file, rather than having to parse the entire thing.

MySQL like most other DB Engines also uses SQL, which is the language it uses to understand queries that you send it, so you would need to learn that as well as C++ if you are unsure about them both.

In C++ you would use a MySQL connector to communicate with this program to insert or retrieve rows, as mentioned by a previous poster. C++ is a programming language so it can do anything from assembly code to making applications, so accessing databases is just like reading a text file. So i wouldnt base a game around being some C++ code that communicates with a database, you will need ALOT more than that to have something classed as a game...
__________________

Grofit is offline  
Old 06-05-2008, 12:13 AM   #6 (permalink)
Cloud's Hair Spray
 
Join Date: Aug 2006
Location: Away from you.
Posts: 70
Reputation: 10
Send a message via AIM to Gauge Send a message via MSN to Gauge Send a message via Yahoo to Gauge
Default

C++ can control it's own databases. mySQL is for web based databasing. i'm sure something exists, but a better question is ..... why?
__________________
Gauge is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:27 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0
OnRPG, Copyright ©2003-2011, Game Entertainment Enterprises