summaryrefslogtreecommitdiff
path: root/src/char/int_mail.c
diff options
context:
space:
mode:
authorSusu <bruant.bastien@gmail.com>2013-06-10 13:52:32 +0200
committerSusu <bruant.bastien@gmail.com>2013-06-10 13:52:32 +0200
commitba8b63be4b9d4df2a9f52bbf655e3ad5c3bf3b1c (patch)
tree77ce50012dd94d7a126e21bdcbfd0df37ae94e0a /src/char/int_mail.c
parent31f9100638dfaf4db057a7653835f715ac8ae94e (diff)
downloadhercules-ba8b63be4b9d4df2a9f52bbf655e3ad5c3bf3b1c.tar.gz
hercules-ba8b63be4b9d4df2a9f52bbf655e3ad5c3bf3b1c.tar.bz2
hercules-ba8b63be4b9d4df2a9f52bbf655e3ad5c3bf3b1c.tar.xz
hercules-ba8b63be4b9d4df2a9f52bbf655e3ad5c3bf3b1c.zip
Added SqlStmt functions to the SQL interface
Diffstat (limited to 'src/char/int_mail.c')
-rw-r--r--src/char/int_mail.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index 9181b7db6..e4b88b5bf 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -122,20 +122,20 @@ int mail_savemessage(struct mail_message* msg)
dbUpdateUid(sql_handle);
// prepare and execute query
- stmt = SqlStmt_Malloc(sql_handle);
- if( SQL_SUCCESS != SqlStmt_PrepareStr(stmt, StrBuf->Value(&buf))
- || SQL_SUCCESS != SqlStmt_BindParam(stmt, 0, SQLDT_STRING, msg->send_name, strnlen(msg->send_name, NAME_LENGTH))
- || SQL_SUCCESS != SqlStmt_BindParam(stmt, 1, SQLDT_STRING, msg->dest_name, strnlen(msg->dest_name, NAME_LENGTH))
- || SQL_SUCCESS != SqlStmt_BindParam(stmt, 2, SQLDT_STRING, msg->title, strnlen(msg->title, MAIL_TITLE_LENGTH))
- || SQL_SUCCESS != SqlStmt_BindParam(stmt, 3, SQLDT_STRING, msg->body, strnlen(msg->body, MAIL_BODY_LENGTH))
- || SQL_SUCCESS != SqlStmt_Execute(stmt) )
+ stmt = SQL->StmtMalloc(sql_handle);
+ if( SQL_SUCCESS != SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, msg->send_name, strnlen(msg->send_name, NAME_LENGTH))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, msg->dest_name, strnlen(msg->dest_name, NAME_LENGTH))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 2, SQLDT_STRING, msg->title, strnlen(msg->title, MAIL_TITLE_LENGTH))
+ || SQL_SUCCESS != SQL->StmtBindParam(stmt, 3, SQLDT_STRING, msg->body, strnlen(msg->body, MAIL_BODY_LENGTH))
+ || SQL_SUCCESS != SQL->StmtExecute(stmt) )
{
SqlStmt_ShowDebug(stmt);
msg->id = 0;
} else
- msg->id = (int)SqlStmt_LastInsertId(stmt);
+ msg->id = (int)SQL->StmtLastInsertId(stmt);
- SqlStmt_Free(stmt);
+ SQL->StmtFree(stmt);
StrBuf->Destroy(&buf);
return msg->id;