theEclipse
Programmer
Hello,
I am nearly positive that there is some way to have mysql select only the first occurance of a data entity on a select.
Maybe a better explanation is given by example. Think of having a table of employees, with one of the columns being their bosses email address. Now I want to do a select statement on the bosses email addresses that only returns one entry for each bosses email, even though that bosses email address will occour > 1 in the table. (more than 1 employee has the same boss...)
I could parse out the duplicates when I get to PHP but I would rather have mysql do the work for me ;-).
Thanks
Robert
Robert Carpenter
"Disobedience to conscience is voluntary; bad poetry, on the other hand, is usually not made on purpose." - C.S. Lewis (Preface to Paradise Lost)
ô¿ô
I am nearly positive that there is some way to have mysql select only the first occurance of a data entity on a select.
Maybe a better explanation is given by example. Think of having a table of employees, with one of the columns being their bosses email address. Now I want to do a select statement on the bosses email addresses that only returns one entry for each bosses email, even though that bosses email address will occour > 1 in the table. (more than 1 employee has the same boss...)
I could parse out the duplicates when I get to PHP but I would rather have mysql do the work for me ;-).
Thanks
Robert
Robert Carpenter
"Disobedience to conscience is voluntary; bad poetry, on the other hand, is usually not made on purpose." - C.S. Lewis (Preface to Paradise Lost)
ô¿ô