Subquery and minor UI updates
This commit is contained in:
parent
476f5d9351
commit
a8571131c6
@ -34,7 +34,7 @@ namespace _2chSQL
|
|||||||
conn.Open();
|
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();
|
var reader = command.ExecuteReader();
|
||||||
@ -42,7 +42,7 @@ namespace _2chSQL
|
|||||||
{
|
{
|
||||||
Console.WriteLine(
|
Console.WriteLine(
|
||||||
string.Format(
|
string.Format(
|
||||||
" {0}: {1}",
|
"#{0}: {1}",
|
||||||
reader.GetInt32(0).ToString(),
|
reader.GetInt32(0).ToString(),
|
||||||
reader.GetString(1)
|
reader.GetString(1)
|
||||||
//reader.GetString(2)
|
//reader.GetString(2)
|
||||||
@ -53,7 +53,7 @@ namespace _2chSQL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine("На этом вся таблица!");
|
//Console.WriteLine("На этом вся таблица!");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DbUpdate(string id, string text)
|
public static void DbUpdate(string id, string text)
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user