diff options
author | Susu <bruant.bastien@gmail.com> | 2013-06-10 13:52:32 +0200 |
---|---|---|
committer | Susu <bruant.bastien@gmail.com> | 2013-06-10 13:52:32 +0200 |
commit | ba8b63be4b9d4df2a9f52bbf655e3ad5c3bf3b1c (patch) | |
tree | 77ce50012dd94d7a126e21bdcbfd0df37ae94e0a /src/char/int_homun.c | |
parent | 31f9100638dfaf4db057a7653835f715ac8ae94e (diff) | |
download | hercules-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_homun.c')
-rw-r--r-- | src/char/int_homun.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 6e4f63849..143277f05 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -121,25 +121,25 @@ bool mapif_homunculus_save(struct s_homunculus* hd) SqlStmt* stmt; int i; - stmt = SqlStmt_Malloc(sql_handle); - if( SQL_ERROR == SqlStmt_Prepare(stmt, "REPLACE INTO `%s` (`homun_id`, `id`, `lv`) VALUES (%d, ?, ?)", skill_homunculus_db, hd->hom_id) ) + stmt = SQL->StmtMalloc(sql_handle); + if( SQL_ERROR == SQL->StmtPrepare(stmt, "REPLACE INTO `%s` (`homun_id`, `id`, `lv`) VALUES (%d, ?, ?)", skill_homunculus_db, hd->hom_id) ) SqlStmt_ShowDebug(stmt); for( i = 0; i < MAX_HOMUNSKILL; ++i ) { if( hd->hskill[i].id > 0 && hd->hskill[i].lv != 0 ) { - SqlStmt_BindParam(stmt, 0, SQLDT_USHORT, &hd->hskill[i].id, 0); - SqlStmt_BindParam(stmt, 1, SQLDT_USHORT, &hd->hskill[i].lv, 0); - if( SQL_ERROR == SqlStmt_Execute(stmt) ) + SQL->StmtBindParam(stmt, 0, SQLDT_USHORT, &hd->hskill[i].id, 0); + SQL->StmtBindParam(stmt, 1, SQLDT_USHORT, &hd->hskill[i].lv, 0); + if( SQL_ERROR == SQL->StmtExecute(stmt) ) { SqlStmt_ShowDebug(stmt); - SqlStmt_Free(stmt); + SQL->StmtFree(stmt); flag = false; break; } } } - SqlStmt_Free(stmt); + SQL->StmtFree(stmt); } } |