source: network-game/server/DataAccess.h@ e607c0f

Last change on this file since e607c0f was 59061f6, checked in by dportnoy <dmp1488@…>, 12 years ago

Added new data access methods to save and retrieve player data

  • Property mode set to 100644
File size: 474 bytes
RevLine 
[36082e8]1#ifndef _DATA_ACCES_H
2#define _DATA_ACCESS_H
3
[59061f6]4#include <string>
5
6#include <mysql/mysql.h>
7
8#include "Player.h"
9
10using namespace std;
11
[36082e8]12class DataAccess {
13public:
14 DataAccess();
15 ~DataAccess();
16
[59061f6]17 int insertPlayer(string username, string password);
18
19 Player *getPlayer(string username);
20 int printPlayers();
21
22 int insert(string table, string rows, string values);
23 MYSQL_RES *select(string table, string filter);
24
25private:
26 MYSQL *connection, mysql;
[36082e8]27};
28
29#endif
Note: See TracBrowser for help on using the repository browser.