1

For an online game I'm making, I need to be able to add users and their stats to a database, an example table:

Username, Password, Email, Wins, Loses

The username will be the unique key, and from there I need to retrieve the other information.

I also need to do other things such as find all the usernames with a given e-mail.

I have been searching for a few hours for an SQLite tutorial that shows C or C++ on how to do these sorts of simple tasks.

Could anyone recommend a tutorial like this or possibly some insight on performing some of the above tasks with the SQLite library?

Thanks

4
  • 1
    Check out SOCI, if that's a possibility Commented Sep 28, 2011 at 0:24
  • For an online game you most likely have a high load once it becomes successful. So you might want to look into a "proper" database server. At least you should think about an architecture where you can switch the data layer out. SQLite can be problematic with many concurrent writes ... Commented Sep 28, 2011 at 0:25
  • 2
    I assume by "password" you mean "securely hashed password". Because you wouldn't want to transmit someone's password in clear-text, right? Commented Sep 28, 2011 at 0:26
  • Also, I'm personally against these sorts of task-oriented tutorials that encourage someone to copy&paste a solution into their codebase without having any understanding of how SQLite works. Maintaining such a database is simple if you understand how SQL works, so focus on using the material that's out there to understand SQL. From there, what you have to do is pretty obvious. Commented Sep 28, 2011 at 0:28

1 Answer 1

6

The SQLite documentation is quite good:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.