Jump to content
New Reality: Ads For Members ×

Hide Duplicates


RedInjection

Recommended Posts

Hello all!

 

I am learning SQL and from what I understand DISTINCT is what I need to hide duplicates?

SELECT provider FROM categories ORDER BY provider

In my table I have several 'provider' that are duplicates, I don't want to delete them but i just want to hide them, what is the best practice of doing this?

Link to comment
https://forums.phpfreaks.com/topic/298976-hide-duplicates/
Share on other sites

Perhaps, but when dealing with OP's, experience shows Op's are mostly not doing things correctly. Based on this OP's other threads, it just enforces that. I go in for the most part assuming the OP is doing things wrong rather than speculate.

 

 

OP, if you can post an SQL dump with your tables and sample data we can let you know if you have any issues that need to be addressed. Your DB structure is the foundation of all the code you are going to write to manage it. If your DB is not right, then your code is not going to be right.

 

 

Right or wrong, at this point in the thread I will assume provider is not a foreign key to the id in the providers table and is likely duplicated text. The only thing that should be in that table is the provider_id.

Link to comment
https://forums.phpfreaks.com/topic/298976-hide-duplicates/#findComment-1525105
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.