]> git.mxchange.org Git - mailer.git/blobdiff - inc/db/lib-mysql3.php
Mailer project rwritten:
[mailer.git] / inc / db / lib-mysql3.php
index d7a7fd3872ea7f8138fb851a8c0be9aace892320..48415aa28abc4cf97b638fc6bae1af3f8b8b2563 100644 (file)
@@ -159,7 +159,7 @@ function SQL_NUMROWS ($resource) {
 }
 
 // SQL affected rows
-function SQL_AFFECTEDROWS() {
+function SQL_AFFECTEDROWS () {
        // Valid link resource?
        if (!SQL_IS_LINK_UP()) return FALSE;
 
@@ -223,6 +223,14 @@ function SQL_CONNECT ($host, $login, $password, $F, $L) {
                 * working database link.
                 */
                SQL_SET_LINK(__FUNCTION__, __LINE__, $linkResource);
+
+               // Init charsets (UTF-8 is default now)
+               SQL_QUERY("SET
+       `character_set_results`='utf8',
+       `character_set_client`='utf8',
+       `character_set_connection`='utf8',
+       `character_set_database`='utf8',
+       `character_set_server`='utf8'", __FUNCTION__, __LINE__);
        } // END - if
 
        // Return the resource