Articles

MySQL update to remove whitespaces

Posted by Cătălin on Wed, 13 Sep 2017

This is how you can replace spaces with MySQL update query

Replace spaces UPDATE `table` SET `col_name` = REPLACE(`col_name`, ' ', '') Remove all tabs characters UPDATE `table` SET `col_name` = REPLACE(`col_name`, '\t', '' ) Remove all new line characters ...

Read More...
dental website

Google Chrome (ERR_EMPTY_RESPONSE)

Posted by Cătălin on Wed, 19 Jul 2017

WHM/cPanel AutoSSL issue with Google Chrome (ERR_EMPTY_RESPONSE)

Today few clients complained about their websites not working in Google Chrome. It seems to be an issue caused by a recent EasyApache 4 update where cPanel included a newer version of OpenSSL to be used...

Read More...
dental website

HTML Minifier

Posted by Cătălin on Fri, 14 Jul 2017

HTML Minifier - Minify HTML and any CSS or JS included in your markup

This will do the magic: //start HTML Minifier function sanitize_output($html) { $search = array( '/\>[^\S ]+/s', // strip whitespaces after tags, except space '/[^\S ]+\/'...

Read More...
dental website

Compare tables find and update in MySQL

Posted by Cătălin on Thu, 22 Jun 2017

Compare two tables find and update only matching data in MySQL

Find: SELECT id, mailing FROM directory_list a JOIN email_temp b ON a.email=b.email; Update: UPDATE directory_list a JOIN email_temp b ON a.email=b.email SET mailing = concat(COALESCE(mailing,...

Read More...
dental website

MySQL find duplicates

Posted by Cătălin on Tue, 13 Jun 2017

MySQL query to find duplicates and to select all but ignore duplicates

Find duplicates: SELECT email FROM directory_list GROUP BY email HAVING COUNT(email) >1; Select all but ignore duplicates: SELECT email FROM directory_list WHERE email LIKE '%@%' GROUP BY email ASC;...

Read More...
dental website

Enable GZIP Compression in WHM

Posted by Cătălin on Fri, 19 May 2017

How to add GZIP compression server-wide in cPanel WHM EasyApache3 or EasyApache4

In cPanel WHM EasyApache3 or EasyApache4, you can add GZIP compression server-wide, including new accounts, by adding the following to Service Configuration → Apache Configuration → Include Editor...

Read More...
dental website