AJAX ADD & RETRIEVE MYSQL RECORDS USING JQUERY & PHP

Leave a Comment
I love jQuery framework, feels like we can do some awesome things easily. If you are familiar with the basic of jQuery framework too, the next thing you have to do is learn to use jQuery Ajax to add and retrieve records from MySql database. Let’s take a look at how we implement real time add and retrieve records using Ajax. Database sample database comment table columns id, name and message ...

C# and MySql : Retrieve Data using MySqlDataReader

Leave a Comment
C# and MySql : Retrieve Data using MySqlDataReader String str = @"server=localhost;database=yourDBname;userid=root;password=yourDBpassword;"; MySqlConnection con = null; //MySqlDataReader Object MySqlDataReader reader = null; try { con = new MySqlConnection(str); con.Open(); //open the connection //We will need to SELECT all or some columns in the table //via this command String cmdText = "SELECT * FROM myTable"; MySqlCommand...

C# and MySql : SELECT , UPDATE , DELETE

Leave a Comment
To Execute Some MySql Statements: SELECT: //This is the simple code of executing MySql Commands in C# String cmdText = "SELECT id,name,contact FROM myTable"; //This line is the MySql Command MySqlCommand cmd = new MySqlCommand(cmdText, con); cmd.ExecuteNonQuery(); //Execute the command UPDATE: //example on how to use UPDATE cmd = new MySqlCommand("UPDATE ab_data SET banned_from='" + from + "' , banned_until='"...

C# : To Connect to a MySql Database

Leave a Comment
Things Needed: You should have installed MySQL and MySQL Connector/NET. You can download installers from http://dev.mysql.com/downloads Microsoft Visual C# or Visual Studio. Download and install MySql for Windows. DownloadHere To use the methods in the MySQL Connector/NET you should add a reference to it. Right click your project in the Solution Explorer and click Add Reference… In the .NET tab, chose MySql.Data and click ok. ...