diff options
author | Dastgir <dastgirpojee@rocketmail.com> | 2015-01-15 12:11:08 +0530 |
---|---|---|
committer | Dastgir <dastgirpojee@rocketmail.com> | 2015-01-15 12:11:08 +0530 |
commit | 06166cac023cefa193926de5a47dd7bc11f298b3 (patch) | |
tree | 3e235122b16652e9262736e82d0f0804680aae22 /src/char/int_mail.c | |
parent | 9fbeb05aa054b5ed9641460d2639f30812edd957 (diff) | |
parent | 3c032b6766ded92ef032862ff3b812cad0eacefd (diff) | |
download | hercules-06166cac023cefa193926de5a47dd7bc11f298b3.tar.gz hercules-06166cac023cefa193926de5a47dd7bc11f298b3.tar.bz2 hercules-06166cac023cefa193926de5a47dd7bc11f298b3.tar.xz hercules-06166cac023cefa193926de5a47dd7bc11f298b3.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/char/int_mail.c')
-rw-r--r-- | src/char/int_mail.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 2c0a85f33..0e5043e14 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -45,7 +45,7 @@ static int inter_mail_fromsql(int char_id, struct mail_data* md) StrBuf->Printf(&buf, " FROM `%s` WHERE `dest_id`='%d' AND `status` < 3 ORDER BY `id` LIMIT %d", mail_db, char_id, MAIL_MAX_INBOX + 1); - if( SQL_ERROR == SQL->Query(inter->sql_handle, StrBuf->Value(&buf)) ) + if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) Sql_ShowDebug(inter->sql_handle); StrBuf->Destroy(&buf); @@ -160,16 +160,13 @@ static bool inter_mail_loadmessage(int mail_id, struct mail_message* msg) StrBuf->Printf(&buf, ",`card%d`", j); StrBuf->Printf(&buf, " FROM `%s` WHERE `id` = '%d'", mail_db, mail_id); - if( SQL_ERROR == SQL->Query(inter->sql_handle, StrBuf->Value(&buf)) - || SQL_SUCCESS != SQL->NextRow(inter->sql_handle) ) - { + if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf)) + || SQL_SUCCESS != SQL->NextRow(inter->sql_handle)) { Sql_ShowDebug(inter->sql_handle); SQL->FreeResult(inter->sql_handle); StrBuf->Destroy(&buf); return false; - } - else - { + } else { char* data; SQL->GetData(inter->sql_handle, 0, &data, NULL); msg->id = atoi(data); @@ -253,8 +250,7 @@ static bool inter_mail_DeleteAttach(int mail_id) StrBuf->Printf(&buf, ", `card%d` = '0'", i); StrBuf->Printf(&buf, " WHERE `id` = '%d'", mail_id); - if( SQL_ERROR == SQL->Query(inter->sql_handle, StrBuf->Value(&buf)) ) - { + if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) { Sql_ShowDebug(inter->sql_handle); StrBuf->Destroy(&buf); |