Added SQL_SetCharset native to (re)set charset even after reconnect (bug 5786, r=psychonic).

This commit is contained in:
Peace-Maker
2013-07-18 10:27:12 -04:00
parent 5a5d8d2d07
commit 69d8b1c30d
7 changed files with 51 additions and 1 deletions
+12
View File
@@ -249,6 +249,18 @@ native SQL_GetDriverIdent(Handle:driver, String:ident[], maxlength);
*/
native SQL_GetDriverProduct(Handle:driver, String:product[], maxlength);
/**
* Sets the character set of the current connection.
* Like SET NAMES .. in mysql, but stays after connection problems.
*
* Example: "utf8", "latin1"
*
* @param database Database Handle.
* @param characterset The character set string to change to.
* @return True, if character set was changed, false otherwise.
*/
native bool:SQL_SetCharset(Handle:database, const String:charset[]);
/**
* Returns the number of affected rows from the last query.
*