PHP/MYSQL Get Only One Record Like....

So I’m trying to develop a script and basically what I’m looking to do is query a MySQL database for the records, but some of the records have the same data. For example.

A | B
A | C - I want this record to be skipped since A is already been echoed
D | E
F | G

I’ve been trying to figure this out for a few days, and every code I’ve had just doesn’t work. Anyone have a framework code I can build off of, or can point me in the right direction of where I need to be.

Thanks :slight_smile:

Can you be more explicit and possibly show what you currently have?

If you want to skip A|C because A|B is already present, either the data is different or the database design was poor/ has lost data integrity.

You could use a DISTINCT clause, but if the data is already compromised I am not sure if it would do much good.

Sponsor our Newsletter | Privacy Policy | Terms of Service