Hello,
I have the follwing query:
"formatex( strQuery, charsmax( strQuery ), "SELECT Salt FROM Player WHERE ( Player.SteamID = %s )", strPlayerAuthID );"
Now if I understand MySQL correctly, this should return the string called Salt of that player. My question is, how do I go about to read that result?
I saw this in the include files:
Code:
/**
* Retrieves the current result.
* A successful query starts at the first result,
* so you should not call SQL_NextRow() first.
* Passing no extra params - return int
* Passing one extra param - return float in 1st extra arg
* Passing two extra params - return string in 1st arg, max length in 2nd
* Example:
* new num = SQL_ReadResult(query, 0)
* new Float:num2
* new str[32]
* SQL_ReadResult(query, 1, num2)
* SQL_ReadResult(query, 2, str, 31)
*/
native SQL_ReadResult(Handle:query, column, any:...);
My query does not return a row, but rather a single entry (the string salt), so I should do the following correct? Correct me if I am wrong please.
Code:
SQL_ReadResult( hQuery, 0, strSalt, charsmax( strSalt ) );
Thank you!
__________________