I want to get one value out of 5 which are the same, lets say 5 records have the same value in some column.
How do I only get one out of them and not 5 ?
Add DISTINCT
to your query:
SELECT DISTINCT field FROM table;
You can group them using MySQl's GROUP BY function.
SELECT field FROM table GROUP BY field
You could use
"SELECT * WHERE column = 'Term' ORDER BY column2 LIMIT 1"
and then a simple while loop to output the data