GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 01-Feb-2005, 10:26
firebird's Avatar
firebird firebird is offline
New Member
 
Join Date: Jan 2005
Posts: 11
firebird is on a distinguished road

SQL: Not Selecting Doubles


Hi,

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 GIDBlogProblems with the Navy (Chiefs) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DiscountASP.NET Launches SQL Reporting Services dasp Web Hosting Advertisements & Offers 0 19-Oct-2004 18:32
Need a script for selecting random tabels and from those tabels selecting random ques mlt MySQL / PHP Forum 2 12-Sep-2003 10:01
Thanx for the sql query, but there must be a little mistake norok MySQL / PHP Forum 13 30-Jun-2003 07:30
mysql vs sql - what is the difference zabell MySQL / PHP Forum 2 14-Jun-2003 17:32
Difference between MySQL and SQL pcxgamer MySQL / PHP Forum 2 14-Apr-2003 13:07

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 13:13.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.