-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.h
38 lines (33 loc) · 849 Bytes
/
database.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//Authors: equati0n,ka0t1k,zzDeagle545zz
#ifndef DATABASE_H
#define DATABASE_H
#include <QSql>
#include <QSqlQuery>
#include <QSqlDatabase>
#include <QDebug>
//Structures
struct Connection{
QSqlDatabase db;
bool connected;
};
//SQL Query
struct Query{
QString uName;
QString pass;
};
namespace DataB{
//*****************************************************************************
//*****************************************************************************
// SQL and Database Functions
//
//
//Registers the User if valid
bool regUsr(Query,QSqlDatabase);
//Checks to see if the username is taken
bool chkUsr(Query,QSqlDatabase);
//Checks to see if a Username and password Match in database
bool cUsrPas(Query,QSqlDatabase);
//Connects to Database
bool DBConnect(Connection);
}
#endif // DATABASE_H