Feedburner subscription – How to add to my wordpress site

Feedburner subscription form is a nice and easy way to help your readers with an automated email subscription facility which includes your latest posts. Here are the steps to add this facility on your wordpress site. Step 1: Create a feedburner account First of all create a feedburner account. To create an account visit http://feedburner.google.com If you are logged into google, it will automatically create an account for you. Step 2: Add your feed URL Add your website feed URL in the box where it says Burn a feed right this instant and click Next Generally it will be http://YOUR_SITE_ADDRESS/feed Step 3: Activate Email Subscriptions Once the feed is created, click on the feed name. Then click on the Publicize tab and Activate Email Subscriptions as shown below by clicking the Activate button. This will activate Email Subscriptions i.e. automated emails to your subscribers. Step 4: Feedburner subscription form Now the last thing is to create a subscription form on your website for the subscribers to register to your feed. Download the Wordpress...
Read More

Storing files and images in mysql database

Biggest advantage of this approach is, you are not required to maintain a seperate directory for documents or images and this proves to be really handy in case you move directories or change servers. You need not worry about the links from the database. Also you need not worry about any complex version control systems to store documents with a same name. 1. Create a table 1. id - INT (6) 2. filename - VARCHAR (100) 3. filetype - VARCHAR (50) 4. filesize - VARCHAR (20) 5. file - BLOB or MEDIUM BLOB 2. File upload (uploadfile.php) [crayon-59c674a7cde15433138720/] 3. Process the above form (procesform.php) [crayon-59c674a7cde21032134342/] 4. Get file (get-file.php) [crayon-59c674a7cde26706654211/] 5. Download a file Now to download a file just link the file to get-file.php with an id e.g. [crayon-59c674a7cde2b103123376/]  ...
Read More

Cloning a database record in MySQL

I thought that cloning a database record should be easy until I decided to write a query for it. I then realized that there is no simple query which clones a record. The steps though are pretty simple: 1. Select the record you want to clone 2. Insert the values in the table Example Lets consider you have an events management database where the primary key is the eventid and you would like to clone the events frequently First of all, here is the query you would use to select the event you want to clone [crayon-59c674a7ce5a7877498949/] Now let's clone the record [crayon-59c674a7ce5b0279010862/] Thus, we have combined INSERT and SELECT query in one query. But there is a problem in this query. When you try running this query, you might get a "duplicate key" error. That's because the record clones everything including the primary key which is the eventid. To avoid that, we need to change our steps as follows 1. Create a temporary table 2. Select the record to be cloned and store it...
Read More