Tag Archives: MySQL

How to Find and Replace Data in MySQL

Recently, while migrating my blog, I had to find all the occurrences of my old URL and replace it with my URL. One way of doing this was to get a database dump, open it in a text editor and the do a find replace and the import it back. This is a 4 step process. However, I found that we can do this only in 1 step directly in MySQL using the UPDATE statement with REPLACE function.

Read more »

Voting Functionality in a website

In this post I will give the step by step explanation of how we can add Voting Functionality to a website. At the end of this article we will have a working sample voting application. The source code for the sample voting application can be downloaded from here.

We will be using PHP, MySQL, jQuery, HTML, CSS, AJAX to implement this.

To setup this functionality we will have to first setup database, then a front-end and also a page which would actually record and retrieve the votes.
Read more »