before -> {<<">">>, <<"asc">>};
_ -> {<<"is not">>, <<"desc">>}
end,
- SNidx = integer_to_binary(Nidx),
+ SNidx = jlib:i2l(Nidx),
[AttrName, Id] = case I of
undefined when IncIndex =/= undefined ->
case catch
get_last_items(Nidx, _From, Count) ->
Limit = jlib:i2l(Count),
- SNidx = integer_to_binary(Nidx),
+ SNidx = jlib:i2l(Nidx),
Query = fun(mssql, _) ->
ejabberd_sql:sql_query_t(
[<<"select top ">>, Limit,
del_item(Nidx, ItemId);
del_items(Nidx, ItemIds) ->
I = str:join([[<<"'">>, ejabberd_sql:escape(X), <<"'">>] || X <- ItemIds], <<",">>),
- SNidx = integer_to_binary(Nidx),
+ SNidx = jlib:i2l(Nidx),
catch
ejabberd_sql:sql_query_t([<<"delete from pubsub_item where itemid in (">>,
I, <<") and nodeid='">>, SNidx, <<"';">>]).