Jump to content
  • Join-Us

    https://metin2.dev is the 1st international community on Metin2 development. Join us to develop your skills and share your knowledge with the community, respectful and ethical forum.

  • 0

[c++]MySQL -> SELECT



I have problem, my code isn't reading properly data from MySQL, type: smallint.

There is number: 64, but this function show me number: 54.

I don't know what is wrong.


My code:

short MyFunction()
	std::auto_ptr<SQLMsg> msg(DBManager::instance().DirectQuery("SELECT coins FROM player.itemshop WHERE name='%s';", pCharName));
	MYSQL_ROW row_coins = mysql_fetch_row(msg->Get()->pSQLResult);

	return row_coints[0][0];
Link to comment
Share on other sites

  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.