- Joined
- Aug 29, 2008
- Messages
- 5
- Reaction score
- 0
Well, I have been working on this, start learning C++ in teh past few weeks,
This what I have made so far:
Well, here it is.
I know its not done yet, but im still beginning
I will make it a executeble and usable and working login server tomorrow.
But its late here, gonna sleep bye.
Leech as much as u want I dont care. I know how it is to be a Nub. I was leecher first to, I started to learn C++ to help al those leechers.
Yes u may think: WTF HELPING LEECHERS!?, well come people cant create stuff so lets help em
-ZiRioN
This what I have made so far:
Code:
#include <iostream>
#include <MySQL>
#include <string>
using namespace std;
string query; //query
string acctname; // acccount name
string acctpass; // pass for the account
string email; // email for account (check)
int main () {
cout << "Initializing MySQL...\n"; //still have to work on this
MYSQL mysql;
//Initiatilize
if (mysql_init(&mysql)) {
cout << "Initialize successful!\n";
}
else {
cout << "Initialize failed!\n";
return 0;
}
//Connect (still doenst work YET)
cout << "\nConnecting to database...\n";
if (mysql_real_connect(&mysql,"127.0.0.1","root","passhere","dbname",0,0,0)) {
cout << "Connected to database.\n";
}
else {
cout << "Connection failed!\n";
return 0;
}
query = "INSERT INTO accounts (acctname,acctpass,email) VALUES ('";
cout <<"\nAccount Name:\n"; // acc in DB
cin >> acctname; // name of acc that gets stored
cout << "\nAccount Password:\n"; // AccName
cin >> acctpass; //Pass needed CharServer acces
cout << "\nEmail:\n";
cin >> email; // email
query.append(acctname);
query.append("','");
query.append(acctpass);
query.append("','");
query.append(email);
query.append("')");
cout << "\n[SQL CODE] - \" " << query << " \" \n";
mysql_query(&mysql,query.c_str());
while (true) {
}
}
Well, here it is.
I know its not done yet, but im still beginning
I will make it a executeble and usable and working login server tomorrow.
But its late here, gonna sleep bye.
Leech as much as u want I dont care. I know how it is to be a Nub. I was leecher first to, I started to learn C++ to help al those leechers.
Yes u may think: WTF HELPING LEECHERS!?, well come people cant create stuff so lets help em

-ZiRioN