added: now plugin ticket uses a new horizontal table (plugins.ticket)
columns: dir_id, param, value we are able to build complicated tickets git-svn-id: svn://ttmath.org/publicrep/winix/trunk@664 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
14
db/db.cpp
14
db/db.cpp
@@ -659,13 +659,20 @@ PGresult * Db::GetItemsQuery(const DbItemQuery & iq, bool skip_other_sel)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
query << R(" order by item.date_creation");
|
||||
|
||||
if( iq.sort_asc )
|
||||
query << R(" asc;");
|
||||
query << R(" asc");
|
||||
else
|
||||
query << R(" desc;");
|
||||
query << R(" desc");
|
||||
|
||||
if( iq.limit != 0 )
|
||||
query << R(" limit ") << iq.limit;
|
||||
|
||||
if( iq.offset != 0 )
|
||||
query << R(" offset ") << iq.offset;
|
||||
|
||||
query << R(";");
|
||||
|
||||
return AssertQuery(query);
|
||||
}
|
||||
@@ -875,6 +882,7 @@ return result;
|
||||
|
||||
|
||||
|
||||
|
||||
long Db::GetItemId(long parent_id, const std::string & url, Item::Type type)
|
||||
{
|
||||
PGresult * r = 0;
|
||||
|
||||
Reference in New Issue
Block a user