Problem regarding mysql query: it is displaying duplicate contents

Reply

Join Date: Oct 2007
Posts: 13
Reputation: jtreyes is an unknown quantity at this point 
Solved Threads: 0
jtreyes jtreyes is offline Offline
Newbie Poster

Problem regarding mysql query: it is displaying duplicate contents

 
0
  #1
Dec 11th, 2007
I made a query that joins 3 tables. Products, parts, and sales invoice tables. The thing is, the common key between the 3 tables is the sales invoice number, but when I try to execute the the query it displays duplicates.

One example is when I make a query on a sales invoice, it displays four rows of results. each row contains a duplicate of the parts and products.

What could be the problem of my query?
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,761
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 332
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Problem regarding mysql query: it is displaying duplicate contents

 
0
  #2
Dec 11th, 2007
It would be easier for us if you give us the structure of the tables and also the query that you are using.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 195
Reputation: mwasif is an unknown quantity at this point 
Solved Threads: 27
mwasif mwasif is offline Offline
Junior Poster

Re: Problem regarding mysql query: it is displaying duplicate contents

 
0
  #3
Dec 13th, 2007
You should use GROUP BY.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the MySQL Forum
Thread Tools Search this Thread



Tag cloud for MySQL
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC