Php, MySQL, How to get selected data from phpMyAdmin database ?

Hey, im making unity database for my rp counPtry.

In my phpMyAdmin database i have 1 table named “obywatele”
and in it are 9 columns - id, nick, imie, nazwisko, pesel, birthdate, birthplace, nazwiskor, homeplace

And i want to make mechanism which one will be giving mi data about person when ill write only nick and pesel
Scheme:
InputField nick:
im writing nick of person
InputField pesel:
im writing pesel of person

Text output:
getting all data about this person = id, nick, imie nazwisko, pesel, birthdate, birthplace, nazwiskor, homeplace

If somebody understand me and know how to do this, please help :slight_smile:

Sorry for my English, im from Poland :stuck_out_tongue:

P.S. PLEASE C#

Create a persistent connection to mysql using the MysqlClient. This is a library that php will also use, so there is no reason to go through your admin tools at all. phpMyAdmin is also not a type of server, it’s just an admin tool, your database is just plain old mysql so you can connect to it however you want (personally I always prefer the terminal client to the web one.)

MySQLConnection connection = new MySqlConnection("SERVER=" + server + ";" + "DATABASE=" + database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";");
connection.Open();  //Can throw so wrap in a try/catch

You get information out of a mysql server by using SELECT and you say what you want to select in the WHERE clause.

MySqlCommand cmd = new MySqlCommand("SELECT * FROM obywatele WHERE nick=" + nick + "  AND pesel=" + pesel, connection);
MySqlDataReader dataReader = cmd.ExecuteReader();

You seem new to the user of a database, so I’ve given you an outline that you can tweak and make do what you want. This is the most bare-bones version of what you want, but you’ll also want to do things like escaping string sequences, proper error handling, and never ever use “SELECT *” in production code.

@newjerseyrunner What is the using tag?

using System.Data.SqlClient;

no tag System.Data

Don’t know what to tell you then, that’s what the namespace is supposed to be:
https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient?view=netframework-4.7.2

Edit:
I just remembered Visual Studio has a modular installation.
Launch your Visual Studio installer, select the “Modify” button on your installation and check the “Data storage and processing” workload.

That makes more sense, thanks