Register for your free account! | Forgot your password?

You last visited: Today at 18:06

  • Please register to post and access all features, it's quick, easy and FREE!

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.

Reply
 
Old   #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?
Spirited42 is offline  
Thanks
3 Users
Old 04/09/2011, 00:47   #2
 
.Ryu's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
=O Good job gareth
.Ryu is offline  
Old 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.
Spirited42 is offline  
Old 04/09/2011, 09:50   #4
 
Huseby's Avatar
 
elite*gold: 106
Join Date: Oct 2006
Posts: 6,047
Received Thanks: 1,164
Done.
Huseby is offline  
Thanks
1 User
Old 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?
Spirited42 is offline  
Old 04/10/2011, 02:24   #6


 
Korvacs's Avatar
 
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.
Korvacs is offline  
Thanks
1 User
Old 04/10/2011, 03:39   #7
 
.Ryu's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
Quote:
Originally Posted by Korvacs View Post
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
.Ryu is offline  
Thanks
2 Users
Old 04/10/2011, 04:10   #8
 
elite*gold: 80
Join Date: Sep 2007
Posts: 642
Received Thanks: 168
Quote:
Originally Posted by .Ryu View Post
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.
Santa is offline  
Thanks
1 User
Old 04/10/2011, 05:04   #9
 
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 97
Quote:
Originally Posted by StarBucks View Post
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.
Spirited42 is offline  
Old 04/10/2011, 10:54   #10


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Quote:
Originally Posted by .Ryu View Post
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...
Korvacs is offline  
Thanks
2 Users
Old 04/10/2011, 12:45   #11
 
.Ryu's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
Quote:
Originally Posted by Korvacs View Post
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
.Ryu is offline  
Old 04/10/2011, 15:39   #12


 
Korvacs's Avatar
 
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.
Korvacs is offline  
Thanks
2 Users
Old 04/10/2011, 17:35   #13
 
.Ryu's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
Quote:
Originally Posted by Korvacs View Post


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
.Ryu is offline  
Old 04/10/2011, 22:11   #14
 
5supertao's Avatar
 
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.
5supertao is offline  
Thanks
1 User
Old 04/11/2011, 15:05   #15
 
drakejoe67's Avatar
 
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
drakejoe67 is offline  
Reply


Similar Threads 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.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.