Fix SQL Error: GROUP BY incompatible with sql_mode=only_full_group_by

MySQL 5.7.5+ changed the GROUP BY behavior. So in this and future versions GROUP BY would not work in same way as it used to be before. So to make GROUP BY feature working like before follow these details: Note: First of all to follow these steps you must need to have root access to […]

MySQL: How to get latest updated Tables’ list

Following query will show a list of the all latest tables which are changed/updated ( by inserting/deleting/updating rows ) recently. USE information_schema; SELECT TABLE_SCHEMA , TABLE_NAME FROM TABLES WHERE UPDATE_TIME IS NOT NULL AND UPDATE_TIME > NOW() – INTERVAL 1 DAY AND TABLE_SCHEMA = ‘Your_Database_Name’  

How to setup Google reCaptcha Version 2.0?

To setup Google reCaptcha oepn url https://www.google.com/recaptcha/admin and fill form as shown in the screenshot below: After registration open newly created reCaptcha site and read the guide provided by google as shown below: Now paste <script src=’https://www.google.com/recaptcha/api.js’></script>  in <head> or anywhere before use of captcha. And then paste <div class=”g-recaptcha” data-sitekey=”6LcPQggTAAAAAAw-SQm8KTEW-N1CBuzBz_gW71UT”></div> to the place where you want to show captcha […]

PHP: How to search and replace string from complete database using PHP

If you want to search and replace string from entire database (from all tables of any database) using php then use following code. <?php // Find and replace facility for complete MySQL database // // Written by Mark Jackson @ MJDIGITAL // Can be used by anyone – but give me a nod if you […]

MySQL: How to duplicate a row using SQL ?

Use following SQL query to duplicate any single row. Use your own field names to make this working in your case. insert into packages (`field_1`, `field_2`, `field_3`, `field_4`) select `field_1`, `field_2`, `field_3`, `field_4` from packages where id=1