|
You last visited: Today at 18:06
Advertisement
[Release] Fastest MySql System [C#]
Discussion on [Release] Fastest MySql System [C#] within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
04/09/2011, 00:33
|
#1
|
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 97
|
[Release] Fastest MySql System [C#]
Removed.
Why do you think?
Is it really THAT shocking to you that I removed it?
|
|
|
04/09/2011, 00:47
|
#2
|
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
|
=O Good job gareth
|
|
|
04/09/2011, 01:47
|
#3
|
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 97
|
#Updated.
I included my MySql Reader too.
This is my full mysql system.
#request thread name change to:
"[Release] Fastest MySql System [C#]"
Thanks. =]
Sincerely,
Spirited.
|
|
|
04/09/2011, 09:50
|
#4
|
elite*gold: 106
Join Date: Oct 2006
Posts: 6,047
Received Thanks: 1,164
|
Done.
|
|
|
04/09/2011, 21:39
|
#5
|
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 97
|
Nobody has anything to say about this? .-.
Can I improve on anything in this?
|
|
|
04/10/2011, 02:24
|
#6
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Eh, this isnt really that fastest method to query mysql nowadays, you need to be using stored procedures really.
|
|
|
04/10/2011, 03:39
|
#7
|
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
|
Quote:
Originally Posted by Korvacs
Eh, this isnt really that fastest method to query mysql nowadays, you need to be using stored procedures really.
|
Your such a downer huh? You can't just say thanks and be on with it lol
|
|
|
04/10/2011, 04:10
|
#8
|
elite*gold: 80
Join Date: Sep 2007
Posts: 642
Received Thanks: 168
|
Quote:
Originally Posted by .Ryu
Your such a downer huh? You can't just say thanks and be on with it lol
|
Its called constructive criticism. If you cannot take it then your choosing the wrong "hobby" or profession. Nobody gets better if nobody tells them its wrong.
|
|
|
04/10/2011, 05:04
|
#9
|
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 97
|
Quote:
Originally Posted by StarBucks
Its called constructive criticism. If you cannot take it then your choosing the wrong "hobby" or profession. Nobody gets better if nobody tells them its wrong.
|
You're right. That's actually what I was looking for actually by releasing this. I really do need advice with coding. Well, hope you guys use it well. I'm going to look up what stored procedures are.
EDIT: Wooaahhh... that's really different. .-. I've never seen anything like that. It seems powerful but very challenging... hmm... maybe I should look at other sites besides Wikipedia.
|
|
|
04/10/2011, 10:54
|
#10
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Quote:
Originally Posted by .Ryu
Your such a downer huh? You can't just say thanks and be on with it lol
|
Well, the rest of it is good, just that the string based query isnt as fast as a stored procedure which moves alot of the work you may want to do with the data onto the mysql server and returns a more precise data set, or allows you to do less handling of data on the game server and more on the mysql server.
They are faster and more powerful than string based queries, but your right i should just keep these sort of improvements to myself and let you guys, the community, flounder around using out dated methods...
|
|
|
04/10/2011, 12:45
|
#11
|
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
|
Quote:
Originally Posted by Korvacs
Well, the rest of it is good, just that the string based query isnt as fast as a stored procedure which moves alot of the work you may want to do with the data onto the mysql server and returns a more precise data set, or allows you to do less handling of data on the game server and more on the mysql server.
They are faster and more powerful than string based queries, but your right i should just keep these sort of improvements to myself and let you guys, the community, flounder around using out dated methods...
|
Is this the stored procedure you might be talking about?
I'm looking into and came across this
Code:
using System;
using System.Collections.Generic;
using System.Data;
using MySql.Data.MySqlClient;
using System.Configuration;
using System.ComponentModel;
[DataObject(true)]
public static class MessagesDB
{
private static string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings
["MySQLConnectionString"].ConnectionString;
}
[DataObjectMethod(DataObjectMethodType.Select)]
public static List<MessageItem> GetMessages()
{
MySqlCommand cmd = new MySqlCommand("ShowAll", new MySqlConnection(GetConnectionString()));
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection.Open();
MySqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
List<MessageItem> MessageItemlist = new List<MessageItem>();
while (dr.Read())
{
MessageItem MessageItem = new MessageItem();
MessageItem.Entry_ID = Convert.ToInt32(dr["Entry_ID"]);
MessageItem.Message = Convert.ToString(dr["Message"]);
MessageItem.Name = Convert.ToString(dr["Name"]);
MessageItem.Email = Convert.ToString(dr["Email"]);
MessageItemlist.Add(MessageItem);
}
dr.Close();
return MessageItemlist;
}
[DataObjectMethod(DataObjectMethodType.Insert)]
public static void InsertMessage(MessageItem MessageItem)
{
MySqlCommand cmd = new MySqlCommand("InsertMessage", new MySqlConnection(GetConnectionString()));
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new MySqlParameter("param1", MessageItem.Name));
cmd.Parameters.Add(new MySqlParameter("param2", MessageItem.Email));
cmd.Parameters.Add(new MySqlParameter("param3", MessageItem.Message));
cmd.Connection.Open();
cmd.ExecuteNonQuery();
cmd.Connection.Close();
}
[DataObjectMethod(DataObjectMethodType.Update)]
public static int UpdateMessage(MessageItem MessageItem)
{
MySqlCommand cmd = new MySqlCommand("UpdateMessage", new MySqlConnection(GetConnectionString()));
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new MySqlParameter("paramkey", MessageItem.Entry_ID));
cmd.Parameters.Add(new MySqlParameter("param1", MessageItem.Name));
cmd.Parameters.Add(new MySqlParameter("param2", MessageItem.Email));
cmd.Parameters.Add(new MySqlParameter("param3", MessageItem.Message));
cmd.Connection.Open();
int i = cmd.ExecuteNonQuery();
cmd.Connection.Close();
return i;
}
[DataObjectMethod(DataObjectMethodType.Delete)]
public static int DeleteMessage(MessageItem MessageItem)
{
MySqlCommand cmd = new MySqlCommand("DeleteMessage", new MySqlConnection(GetConnectionString()));
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new MySqlParameter("param1", MessageItem.Entry_ID));
cmd.Connection.Open();
int i = cmd.ExecuteNonQuery();
cmd.Connection.Close();
return i;
}
}
I would just post the link but i'm not quite sure it's allowed.
#Edit
Well...here is something else i found
Or even this
Is this what your talking about i'm not sure i quite get it yet
|
|
|
04/10/2011, 15:39
|
#12
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Yes those are examples of using stored procedures, one of the important parts is that you only need send the variables to the server instead of the entire string, and then the mysql server does all of the rest of the work, you obviously need to write the rest of the handling on the mysql server.
My fusionorigins source and cuosp source both use stored procedures.
|
|
|
04/10/2011, 17:35
|
#13
|
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
|
Quote:
Originally Posted by Korvacs
Yes those are examples of using stored procedures, one of the important parts is that you only need send the variables to the server instead of the entire string, and then the mysql server does all of the rest of the work, you obviously need to write the rest of the handling on the mysql server.
My fusionorigins source and cuosp source both use stored procedures.
|
Oh i see =O i will download your source to check it out then thanks
|
|
|
04/10/2011, 22:11
|
#14
|
elite*gold: 0
Join Date: Feb 2010
Posts: 89
Received Thanks: 19
|
Unlike you do for me I'll say. Good job, atleast your learning and not leaching. Even if things aren't the BEST. YOU can't be the best without practice. Good job.
|
|
|
04/11/2011, 15:05
|
#15
|
elite*gold: 0
Join Date: Feb 2008
Posts: 322
Received Thanks: 121
|
Thanks, hopefully this might make a difference in my SQL handler and my SQL problems could dissapear, well a step
thx
|
|
|
|
|
Similar Threads
|
Mysql Login System erstellen
04/04/2011 - Web Development - 9 Replies
Hallo zusammen =)
ich mal wieder xD
da mein anderes problem mit dem Kontaktformular noch in Arbeit ist, komme ich schon einmal zu meinem nächsten Problem
ich habe ,nach dem Tutorial von Hier
Eine Datenbank erstellt und bin schon bei Punkt 2 und genau da tritt mein problem auf....
|
Vote System zeigt MySQL Error
01/07/2011 - WoW Private Server - 1 Replies
Hey,
für unseren 2.4.3 Armemu Server wollten wir ein VOte System einbauen.. Klappte alles wunderbar aber es kommt wenn man auf "Vote now" klickt ein MySQL Erro:
Unknown column 'votes' in 'field list'
Folgende Dbs sind vorhanden:
rewars
shoplog
topsites
votelog
|
[Release] MySQL Insert system
07/18/2010 - CO2 PServer Guides & Releases - 18 Replies
Ello!
First of all, this is NOT sourcedependent, which means you can use this on any source without modifying the code.
This is an replacement for all of you who still uses normal MySQL queries. Use this code to clean up, make it easier and more orginazed.
Here's how it looks:
Example: (Original (LOTF for example))
|
[Help CoEmuV2 (PHP/MYSQL required)] Donation system
07/18/2009 - CO2 Private Server - 2 Replies
I want an system if someone donated it updates an other column so:
Confirmation Code : put something here // Mysql table: Dragonballs.Dcode
Confirmation Pass : put something here // Mysql table: Dragonballs.Dpass
And then if you click claim it updates the table/column : Characters.Prize
With the amount of : Dragonballs.Damount
|
All times are GMT +2. The time now is 18:06.
|
|