added function: uname
added function: subject - for changing a subject git-svn-id: svn://ttmath.org/publicrep/winix/trunk@600 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
27
core/db.cpp
27
core/db.cpp
@@ -1259,6 +1259,33 @@ return result;
|
||||
|
||||
|
||||
|
||||
Error Db::EditSubjectById(Item & item, long id)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
Error result = WINIX_ERR_OK;
|
||||
|
||||
try
|
||||
{
|
||||
AssertConnection();
|
||||
std::ostringstream query;
|
||||
query << "update core.item set (subject) = (";
|
||||
query << '\'' << Escape(item.subject) << "') ";
|
||||
query << " where id='" << id << "';";
|
||||
|
||||
r = AssertQuery(query.str());
|
||||
AssertResultStatus(r, PGRES_COMMAND_OK);
|
||||
}
|
||||
catch(const Error & e)
|
||||
{
|
||||
result = e;
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Db::DelItemDelItem(const Item & item)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user