This commit is contained in:
parent
f5349db697
commit
e445c2bda1
15
DBchat.cs
15
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)
|
(
|
||||||
|
SELECT post_id, post
|
||||||
FROM dvach
|
FROM dvach
|
||||||
ORDER BY post_id DESC
|
ORDER BY post_id DESC
|
||||||
)
|
) subquery
|
||||||
subquery ORDER BY post_id ASC", conn) )
|
ORDER BY post_id ASC", conn) )
|
||||||
{
|
{
|
||||||
|
|
||||||
var reader = command.ExecuteReader();
|
var reader = command.ExecuteReader();
|
||||||
|
Reference in New Issue
Block a user