Quote:
How can i display the data just only once even thought have multiple duplicate in the table
You could use a
DISTINCT[
^] clause for a single query
But in this case it is more likely to be your use of UNION ALL. Use just UNION instead and SQL will get rid of the duplicates for you
Edit:
For completeness sake I feel I should point out a couple of ways of avoiding duplicates in the first place..
You could query for the data first and only insert if not found - this is known as "upsert" and there are three examples of how to that at
MySQL UPSERT | Three Techniques to Perform an UPSERT[
^]
There is more information about using a unique index to prevent duplicates at
Using MySQL UNIQUE Index To Prevent Duplicates[
^]