diff options
Diffstat (limited to 'lib/db.c')
-rw-r--r-- | lib/db.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -355,8 +355,7 @@ int cDbStatement::bindCmp(const char* ctable, const char* fname, cDbValue* value return success; } -int cDbStatement::bindText(const char* text, cDbValue* value, - const char* comp, const char* delim) +int cDbStatement::bindText(const char* text, cDbValue* value, const char* comp, const char* delim) { if (!value) { @@ -1522,12 +1521,16 @@ int cDbTable::truncate() tmp = "delete from " + std::string(TableName()); if (connection->query("%s", tmp.c_str())) + return connection->errorSql(connection, "truncate() 'delete from'", 0, tmp.c_str()); + + tmp = "truncate table " + std::string(TableName()); + + if (connection->query("%s", tmp.c_str())) return connection->errorSql(connection, "truncate()", 0, tmp.c_str()); return success; } - //*************************************************************************** // Store //*************************************************************************** |