wqe Select CustomerID,SalesID,CustomerName,Num_Of_Bottles,Price,Status from sales,customer where Date = DATE_FORMAT(NOW(),'%b %d, %Y') and CustomerID>0 Order by SalesID DESC

Recommended Answers

What is the question?

Jump to Post

from sales,customer

You are selecting from two tables without a join. That causes such behaviour.

Jump to Post

All 5 Replies

What is the question?

why is it duplicating? this is the real result in table but in query it duplicated 150230

from sales,customer

You are selecting from two tables without a join. That causes such behaviour.

how can i fix it?

Hard to say, depends on the information you have and need. You'll need to provide your table structure, sample data and sample output.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.