diff --git a/DBLinks.cs b/DBLinks.cs index 6d1810e..fd5e863 100644 --- a/DBLinks.cs +++ b/DBLinks.cs @@ -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) diff --git a/bin/Debug/net6.0/2chSQL.dll b/bin/Debug/net6.0/2chSQL.dll index 4d68353..d497900 100644 Binary files a/bin/Debug/net6.0/2chSQL.dll and b/bin/Debug/net6.0/2chSQL.dll differ diff --git a/bin/Debug/net6.0/2chSQL.pdb b/bin/Debug/net6.0/2chSQL.pdb index afc60a1..eae0f25 100644 Binary files a/bin/Debug/net6.0/2chSQL.pdb and b/bin/Debug/net6.0/2chSQL.pdb differ diff --git a/obj/Debug/net6.0/2chSQL.dll b/obj/Debug/net6.0/2chSQL.dll index 4d68353..d497900 100644 Binary files a/obj/Debug/net6.0/2chSQL.dll and b/obj/Debug/net6.0/2chSQL.dll differ diff --git a/obj/Debug/net6.0/2chSQL.pdb b/obj/Debug/net6.0/2chSQL.pdb index afc60a1..eae0f25 100644 Binary files a/obj/Debug/net6.0/2chSQL.pdb and b/obj/Debug/net6.0/2chSQL.pdb differ