So right now i am currently trying to make a search function!
this is a picture of my current Application
https://gyazo.com/38de0c30ba87e7c30fe6b7410a761c0d
As you can see i still haven't figured out requesting and displaying data info eg how many people are in the data base and what the current username is and a spew of other things i'd like to add in the future
::NOTE:: Forgot to add the "Search Button" i now notice lol
But what i am trying to do yet not really understanding how, i've seen some stuff kinda on how but i would like to know how it all really works instead of jst putting some code there and hoping it works but i am trying to make it so someone will enter a search term eg. John and press search, then in the results box it will list out all people in the database (MySQL) named John and their Last name and account number
1 2 3 4 5 6 7
|
//I've got down how i send a query to the DB but not how i'd recive output from it and display it on the application (The Search Function)
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
String^ constring = L"datasource=;port=3306;username=;password=";
MySqlConnection^ conDatabase = gcnew MySqlConnection(constring);
MySqlCommand^ cmdDatabase = gcnew MySqlCommand("select * from database.logins where user_name='"+this->textBox1->Text+"'and password='"+this->textBox2->Text+"';", conDatabase);
MySqlDataReader^ myReader;
|
I as well am trying to make an admin page so if someone has an account of a certain level or what ever they can log into the Admin Page and from there add remove change etc from it as seen below i've got the C++ end of it down my main issue is just SQL as im not the freshest with SQL and then with the results and users in DB i am just clueless as to how i interpret the data
https://gyazo.com/486e346453a6ce2fa6044f305ba012ce
And how i would display things such as how many people are in the database etc
if ANYONE knows how i would go about these things and would tell me a great place for tutorials i would love to know!