Hello people.
I have a good question. In almost every part of Internet I see methods that help to save Mysql queries into an array using php, BUT I need to do it using C#.:suss:
I found this:
http://stackoverflow.com/questions/4440378?tab=newest#tab-top[
^]
and I have the same method using ExecuteReader but the answer didn't help me at all :thumbsdown:, I still have the following problem:
I have 2 columns in mysql: initialdate, finaldate. With 3 numbers of rows as an example.
I execute the following query: select * from datetable
And then, when I want to read the received information with my C# app:
myReader = myCommand.ExecuteReader();
while(myReader.Read())
{
Console.WriteLine(myReader.GetString(0));
Console.WriteLine(myReader.GetString(1));
Console.WriteLine(myReader.GetString(2));
Console.WriteLine(myReader[0]);
Console.WriteLine(myReader[1]);
Console.WriteLine(myReader[2]);
}
}
I tried to recover the info using something like:
Console.WriteLine(myReader.GetString(0,0));
//or:
Console.WriteLine(myReader[0,0]);
Console.WriteLine(myReader[0][0]);
But it doesn't work :((
How can I recover the rest of rows? HEEEELP! and Thanks!