This commit is contained in:
parent
f5349db697
commit
e445c2bda1
19
DBchat.cs
19
DBchat.cs
@ -34,13 +34,22 @@ namespace NeDvachAPI
|
|||||||
conn.Open();
|
conn.Open();
|
||||||
|
|
||||||
|
|
||||||
|
// using ( var command = new NpgsqlCommand(@"
|
||||||
|
// SELECT * FROM
|
||||||
|
// (SELECT post_id, substring(post,1,200)
|
||||||
|
// FROM dvach
|
||||||
|
// ORDER BY post_id DESC
|
||||||
|
// limit 10
|
||||||
|
// )
|
||||||
|
subquery ORDER BY post_id ASC", conn) )
|
||||||
using ( var command = new NpgsqlCommand(@"
|
using ( var command = new NpgsqlCommand(@"
|
||||||
SELECT * FROM
|
SELECT * FROM
|
||||||
(SELECT post_id, substring(post,1,200)
|
(
|
||||||
FROM dvach
|
SELECT post_id, post
|
||||||
ORDER BY post_id DESC
|
FROM dvach
|
||||||
)
|
ORDER BY post_id DESC
|
||||||
subquery ORDER BY post_id ASC", conn) )
|
) subquery
|
||||||
|
ORDER BY post_id ASC", conn) )
|
||||||
{
|
{
|
||||||
|
|
||||||
var reader = command.ExecuteReader();
|
var reader = command.ExecuteReader();
|
||||||
|
Reference in New Issue
Block a user