Hi all
I am a new c sharp programmer and I was looking at this code:
And I was wondering if anyone could rewrite the code so that it display the MySQL table data for a specific user I already have a string called username and that stores the username entered on the login form. I want the code to use the username string to search for the name and display that users info.
My table contents are: username
First name
Last name
Position
Employee Id
Airline
If you do this it would be greatly appreciated
I am a new c sharp programmer and I was looking at this code:
Code:
private void button1_Click(object sender, EventArgs e)
{
string input = textBox3.Text;
connectdatabase();
string wow = "SELECT `CustomerName` FROM `CustomerInfo`";
MySqlCommand wowcmd = new MySqlCommand(wow, connection);
MySqlDataReader Reader;
Reader = wowcmd.ExecuteReader();
while (Reader.Read())
{
if (input == Convert.ToString(Reader))
{
textBox5.Text = Convert.ToString(Reader);
}
}
}
Post Reply
My table contents are: username
First name
Last name
Position
Employee Id
Airline
If you do this it would be greatly appreciated
Comment