Thanks .Arco :D
+Thanks
+Thanks
You may need to make this public/static.Quote:
MySqlConnection connection;
Quote:
MySqlCommand cmd = new MySqlCommand("SELECT * FROM `accounts`", connection) // Get all data from the accounts table
MySqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read()) // While it keeps reading
{
Console.WriteLine(rdr["Name"]); // Output the variablename value "Name" in the console
}
rdr.Close(); //Closes the reader
Im interested in what you did which you would class as advanced?Quote:
I converted EVERYTHING into MySQL in my source, without using anything as a guide.
@Paralyzer, Knowing you level of C# knowledge, just give up, it's way too advanced for you.(If you did it the way I did, however)
Quote:
First of all you need to implement the MySql.Data.dll into the project (Add refference).
Then you need to set up an connection, don't know if you have a Database.cs, but somewhere where the data base is handled, do a new connection string.
You do this by using
You may need to make this public/static.
Then, you need a Connect function. Basically, this is just used to create a new MySqlConnection with the correct host,user and database (check other SQL sources for examples, this vary on your DB). Don't forget to open the connection.
Now, people suggested you to use the LOTF way, well don't.
Here's an example how another way works:
Good luck!
Quote:
Well I have been wondering this for a long but but I relise you need another .cs file I dono call it Connect.cs and ur gonna want the tables Characters, Accounts, Top archer, Top ko, Top Donations etc
But how would you do this ? change the method from biniary to save ? idk just asking for some help with this and I may try to do this.
"Okay". I'm not even going to bring the discussing to the table, but yeah none of you seen me code for over a year, and the way I showed on page 2 is a really good way to do it.Quote:
Just do a search on the net for MySQL in C#, i wouldnt bother listening to emme if i were you, hes not great at programming, and fails even more at explaining things.
Yeah we support people helping, not hindering, which what you tend to do.Quote:
"Okay". I'm not even going to bring the discussing to the table, but yeah none of you seen me code for over a year, and the way I showed on page 2 is a really good way to do it.
Btw, don't moderators support people helping? :)
@herekorvac
I'm not spoonfeeding him, that's helping, explaining to him every row in a good way to do MySQL queries, it's not like I'm giving him a copy-paste code.
peace
korvacs luves me,Quote:
Yeah we support people helping, not hindering, which what you tend to do.
SQL is something that changes from source to source and from use to use, youve demonstrated a bad way of doing 1 aspect of SQL, what happens if the connection is already active, or in use, or limited to 1 user, or it times out. You havent handled any of these.
You arnt using stored procedures either, so its going to be alot slower than it could be.
You are happy doing what your doing, no need for you to come back here emme.