how to find duplicate records in sql

SELECT id,unit_name, unit_code
FROM newage123.unit_master
GROUP BYunit_name, unit_code
HAVING ( COUNT(*) > 1 )

Advertisements

angularjs focous to text box using button

html :

set focus 1
set focus 2

java script :

var app = angular.module(‘app’,[]);

app.controller(‘ctrl’,function($scope){
$scope.hello = “hello”;

$scope.focus1 = function(){
$scope.setFocusInput1();
};
$scope.focus2 = function(){
$scope.setFocusInput2();
};
});

app.directive(‘rfocus’,function(){
return {
restrict: ‘A’,
controller: function($scope, $element, $attrs){
var fooName = ‘setFocus’ + $attrs.rfocus;
$scope[fooName] = function(){
$element.focus();
}
},
}
});