You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
833 B
26 lines
833 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using MySql.Data.MySqlClient;
|
|
|
|
namespace tmp {
|
|
class Program {
|
|
static void Main(string[] args) {
|
|
string fieldToSelect = args[0];
|
|
using(MySqlConnection connection = new MySqlConnection("Protocol=pipe;Charset=utf8;Database=flocal_production;Username=flocalp;Password=flocalp")) {
|
|
connection.Open();
|
|
using(MySqlCommand command = connection.CreateCommand()) {
|
|
command.CommandText = "SELECT `" + fieldToSelect + "` FROM `boards`";
|
|
Console.WriteLine("Command: " + command.CommandText);
|
|
using(MySqlDataReader reader = command.ExecuteReader()) {
|
|
Console.WriteLine("Command executed");
|
|
while(reader.Read()) {
|
|
Console.WriteLine("Data read");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|