Why do you want to Json encode the SQL output? Why don't you use the output straight away?The reason why username is added to the Json encode is because that is the field name that you have selected in the SQL.