static cell_t SQL_Execute(IPluginContext *pContext, const cell_t *params) { IPreparedQuery *stmt; HandleError err; if ((err = ReadStmtHndl(params[1], pContext, &stmt)) != HandleError_None) { return pContext->ThrowNativeError("Invalid statement Handle %x (error: %d)", params[1], err); } return stmt->Execute() ? 1 : 0; }
IQuery *SqDatabase::DoQueryEx(const char *query, size_t len) { IPreparedQuery *pQuery = PrepareQueryEx(query, len, NULL, 0, NULL); if (!pQuery) { return NULL; } if (!pQuery->Execute()) { pQuery->Destroy(); return NULL; } return pQuery; }