2 solutions:
1- Use the DISTINCT word in your query to get only an unique instance if each element
your query
<CFQUERY ...>
SELECT DISTINCT(state_name) FROM states
ORDER BY state_name asc
</CFQUERY ...>
2- Create a loop that would only output some unique element to do so you must order your elements by (in your case) the stateID (state unique identifier in your DB).
your query
<CFQUERY NAME="state_Get"...>
SELECT * FROM states
ORDER BY stateID asc
</CFQUERY ...>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.