To check if your player is already created or not, I would use this SQL order:
"SELECT count(*) FROM player_index WHERE name='player'"
And then check the result with mySQL_GetVal(0, 0), if you got a 0, MySQL didnt found your player.

Or, use the mySQL_RowNumber() - Return the number of row in the result dataset.

Destop