Change db collation of all tables in mysql

SELECT CONCAT( 'ALTER TABLE `', t.`TABLE_SCHEMA` , '`.`', t.`TABLE_NAME` , '` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' ) AS stmt FROM `information_schema`.`TABLES` t WHERE 1 AND t.`TABLE_SCHEMA` = '' ORDER BY 1 LIMIT 0 , 50 Above mysql query generate Alter table commands for the specified database. Run these sql statement as group.

Read More »

Template: Featured Image (Vertical)

This post should display a featured image, if the theme supports it. Non-square images can provide some unique styling issues. This post tests a vertical featured image.

Read More »

Template: Featured Image (Horizontal)

This post should display a featured image, if the theme supports it. Non-square images can provide some unique styling issues. This post tests a horizontal featured image.

Read More »

Template: Excerpt (Defined)

This is a user-defined post excerpt. It should be displayed in place of the post content in archive-index pages.

Read More »

Add multiple products to Paypal Cart with One Click

Paypal is a payment gateway used in number of websites in world wide.We can post shopping cart info  to paypal from the website The following code shows the syntax of code used to post multiple cart items to paypal <form id=”paypalform” action=”https://www.paypal.com/cgi-bin/webscr” method=”post” name=”paypal_auto_form”> <input name=”rm” type=”hidden” value=”2″ /> <input name=”cmd” type=”hidden” value=”_cart” /> <input name=”upload” type=”hidden” value=”1″ /> <input ...

Read More »

Find Country Name By IP Address using PHP

Use the following Code to get geo location details based on Your IP $country data=getLocationInfoByIp(); echo $country data['country']; echo $country data['city']; function getLocationInfoByIp() { $current_ip = @$_SERVER['HTTP_CLIENT_IP']; $forwardip = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remoteip = @$_SERVER['REMOTE_ADDR']; $geo_data = array('country'=>'', 'city'=>''); if(filter_var($current_ip, FILTER_VALIDATE_IP)) { $ipaddress = $current_ip; } elseif(filter_var($forwardip, FILTER_VALIDATE_IP)) { $ipaddress = $forwardip; } else { $ipaddress = $remoteip; } $your_ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ipaddress)); // print_r($your_ip_data); ...

Read More »

Applications invites for various posts in Kochi Metro Rail ltd

Last date of Application: march 18 2015 How to apply Address to send Applications  Dy. General Manager (HR & Training), Kochi Metro Rail Ltd., 8th Floor, Revenue Tower, Park Avenue, Kochi- 682011 Download Application Form I.OPERATIONS DEPARTMENT – TOTAL POSTS = 74 Name of the post Addl. General Manager (Operations) Total No. of posts 1 Grade E7, `43200 – 66000 (IDA) ...

Read More »

Get URL parameters using javascript or jquery

Example URL http://smarttips.in?newsletter=1 <script> var queryString = (function(url) { if (url == “”) return {}; var smart = {}; for (var i = 0; i < url.length; ++i) { var pS=url[i].split(‘=’, 2); if (pS.length == 1) smart[pS[0]] = “”; else smart[pS[0]] = decodeURIComponent(pS[1].replace(/+/g, “””)); } return pS; })(window.location.search.substr(1).split(‘&’)); $(document).ready(function(){ if(queryString[“newsletter”]==1) { alert(‘Got it!!!’) } }); </script>

Read More »