![]() |
|
#1
|
||||
|
||||
SQL: Not Selecting DoublesHi,
on my current project I've come across something which I don't-know-how myself. This is not a thing of figuring but simply knowing. I'll firstly post an idea of what I'm looking for, followed by some practical explanation. ---------------- SELECT * FROM `reports` WHERE EntryID is unique Means if the table holds EntryID #5 twice, it will return it only once. ---------------- Okay, so there's this contest where you can enter in. Now, people can report entries of which they think they don't belong there. Let's move on to the moderator page. There's a page that will show all reports. However, there will surely enough be multiple reports of the same entry. Imagine the table looks like so: ReportID, Reporter, EntryID 1, 2, 5 2, 3, 5 3, 4, 6 4, 5, 5 I wouldn't want the page to display the reports for EntryID #5 three times. That's it ! Big Thanks! |
Recent GIDBlog
Prepping for deployment by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DiscountASP.NET Launches SQL Reporting Services | dasp | Web Hosting Advertisements & Offers | 0 | 19-Oct-2004 17:32 |
| Need a script for selecting random tabels and from those tabels selecting random ques | mlt | MySQL / PHP Forum | 2 | 12-Sep-2003 09:01 |
| Thanx for the sql query, but there must be a little mistake | norok | MySQL / PHP Forum | 13 | 30-Jun-2003 06:30 |
| mysql vs sql - what is the difference | zabell | MySQL / PHP Forum | 2 | 14-Jun-2003 16:32 |
| Difference between MySQL and SQL | pcxgamer | MySQL / PHP Forum | 2 | 14-Apr-2003 12:07 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The