Subquery and minor UI updates

This commit is contained in:
RakVhalate 2022-10-15 15:45:26 +10:00
parent 476f5d9351
commit a8571131c6
5 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ namespace _2chSQL
conn.Open();
using (var command = new NpgsqlCommand("SELECT post_id, substring(post,1,200) FROM dvach ORDER BY post_id DESC limit 20", conn))
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))
{
var reader = command.ExecuteReader();
@ -42,7 +42,7 @@ namespace _2chSQL
{
Console.WriteLine(
string.Format(
" {0}: {1}",
"#{0}: {1}",
reader.GetInt32(0).ToString(),
reader.GetString(1)
//reader.GetString(2)
@ -53,7 +53,7 @@ namespace _2chSQL
}
}
Console.WriteLine("На этом вся таблица!");
//Console.WriteLine("На этом вся таблица!");
}
public static void DbUpdate(string id, string text)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.