If you add a WHERE clause to the SQL (you already know what username you're searching for) you will know in a trice whether the username exists or not. Then you can test the results of the query (eg how many rows returned?) and have the answer poste haste. When you iterate through the rows,
response will only tell you whether the last row selected is this username (or not).
P&C: The phrase "i am tired of trying" is not optimal to solicit assistance. Something simpler (and humbler) like "what am i doing wrong?" brings out the best in all of us.