Skip to main content

Posts

Best way to find duplicate records in a table on database

Method 1: The method will display group wise duplicate leads. SELECT     eabhyasa_id, eabhyasa_name, eabhyasa_email, eabhyasa_mobile,stage_name,count(*) no_of_records FROM rns_leads as L     left join rns_stages as S on S.stg_id= E.eabhyasa_stg_id GROUP BY eabhyasa_email, eabhyasa_mobile HAVING count(*) > 1  Method 2: The below method will display all duplicate leads SELECT L.eabhyasa_id, L.eabhyasa_fname, L.eabhyasa_email, L.eabhyasa_mobile,S.stg_name, case when E.eabhyasa_cp_type=0 then "-" when E.eabhyasa_cp_type=1 then "Fssess" when E.eabhyasa_cp_type=2 then "full" when E.eabhyasa_cp_type=3 then "part1" when E.eabhyasa_cp_type=4 then "part2" when E.eabhyasa_cp_type=5 then "part3" when E.eabhyasa_cp_type=6 then "part4" end as Payment_Stage FROM rns_leads L left join gti_stages as S on S.stg_id= E.eabhyasa_stg_id INNER JOIN ( SELECT eabhyasa_email, eabhyasa_mobile,count(*) no_of_records FROM gt

How to Select/Check all radio buttons using Jquery

Use below HTML code to Check all radio buttons <input type="radio" class="presnt_all" name="emp_attendance" id="emp_attendance" value="1"/>All Present <input type="radio" class="absent_all" name="emp_attendance" id="emp_attendance" value="2"/>All Absent <input type="radio" class="leave_all" name="emp_attendance" id="emp_attendance" value="3"/>All Leave <input type="radio" class="presnt_att" name="emp_attendance1" id="emp_attendance1" value="1" />Present <input type="radio" class="absent_att" name="emp_attendance1" id="emp_attendance1" value="2" />Absent <input type="radio" class="leave_att" name="emp_attendance1" id="emp_attendance1" value="3" />Leave

Remove www & force https from URL using htaccess

By Using below code we are able to remove www and force https from URL using htacces   RewriteEngine On   RewriteCond %{HTTP_HOST} ^www.greenrobot.com$ [NC] RewriteRule ^(.*)$ https://greenrobot.com/$1 [R=301,L]   RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]   Or   <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] </IfModule>