Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
no funtion
  • Loading branch information
“craciun2” committed Mar 1, 2018
1 parent 33c19c7 commit bae452a692e1f55f47c0d679d0697ff4249bcdbe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
BIN +44.2 KB MAIN
Binary file not shown.
@@ -14,19 +14,7 @@ using namespace std;



int createTeam(int Player_ID, string teamName)
{


sqlite::sqlite db( "ball.sqlite" );
auto cur = db.get_statement();
cur->set_sql( "INSERT INTO MyTeam (Player_ID, TeamName) VALUES (?,?);" );
cur->prepare();
cur->bind( 1, Player_ID );
cur->bind( 2, teamName );
cur->step();
return 0;
}


// First menu, this will be showed when u start
char menuu()
@@ -159,12 +147,17 @@ char menuu()
cur->bind( 2, password );
int result= cur->step();
int Player_ID = cur->get_int(0);
//sqlite::sqlite3_close(db);
cout<<teamName<<endl;
cout<<Player_ID<<endl;
//sqlite::sqlite3_close(db);
cur = NULL;
createTeam(Player_ID,teamName); // caling to create a team
//createTeam(Player_ID,teamName); // caling to create a team
// end of getting the ID
// Create the team
cur = db.get_statement();
cur->set_sql( "INSERT INTO MyTeam (Player_ID, TeamName) VALUES (?,?);" );
cur->prepare();
cur->bind( 1, Player_ID );
cur->bind( 2, teamName );
cur->step();


goto MainMenu;
BIN +0 Bytes (100%) ball.sqlite
Binary file not shown.
BIN -3 Bytes (100%) md5_sample
Binary file not shown.
@@ -6,5 +6,6 @@ using std::cout; using std::endl;
int main()
{
cout << "md5 of 'grape': " << md5("grape") << endl;
cout << "md5 of 'sss': " << md5("sss") << endl;
return 0;
}

0 comments on commit bae452a

Please sign in to comment.