Question: In a MySQL database I have to maintain I have this table with two indexes

```
CREATE TABLE users (
    id INTEGER UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT,

    -- some attributes

    nickname VARCHAR (20) NOT NULL UNIQUE,
    password VARCHAR (20) NOT NULL,

    -- other attributes

    PRIMARY KEY (id),
    INDEX auth (nickname, password),
    INDEX region_id (region)
);

```

My question is about `auth` index. It is a multi-column index, but since `nickname` is `UNIQUE`, isn't `password` somehow redundant? Why an index on both `nickname` and `password`? Why not only `nickname` since it is `UNIQUE`?

Answer: 
use 

```
 $( ".selector" ).autocomplete({
        select:function(value, data) {
        //your selection code goes here
        }
});

```
I modified the member function:

```
        this._on( this.input, {
            autocompleteselect: function( event, ui ) {
                ui.item.option.selected = true;
                this._trigger( "select", event, {
                    item: ui.item.option
                });
                if ( objPeople && objPeople[ui.item.value] ) {
        var objUser = objPeople[ui.item.value];
        alert("HERE");            
      }
            },
            autocompletechange: "_removeIfInvalid"
        });

```

And this works.