Okay,
I've been racking my brain with this simple query for hours now. Essentially I SELECT a distinct ID based on a FULLTEXT search of a description field:
/ QUERY FOR UNIQUE ID /
$uniqueid = mysql_query("SELECT DISTINCT ID, MATCH (Description) AGAINST ('$search_string') AS score FROM database WHERE MATCH (Description) AGAINST ('$search_string') ORDER BY score DESC");
$unique_result = mysql_num_rows($uniqueid);
/PRINT ITERATION/
while($row = mysql_fetch_array($uniqueid)){
$id = $row["ID"];
print("$id");
}
However, at times I recieve 2 or more ID recordsets returned from the query thus causing duplicate ID's to print to the browser. What I would like is that: If there is a duplicate ID returned from the query to skip the duplicate and continue the print iteration. My brain is not quite sure where in the loop to put such a statement or if it could be taken care of within the query itself by comparing another unique identifier in the table (which I do have - it's named "cad_number").
I'm thinking an eregi() and continue; may be the solution but am stumped.
Thx