Copy link to clipboard
Copied
Trying to build a database search form, (php Mysql) everything ok until I created a dynamic List/Menu using the DW (CS4) wizard. I'm getting duplicates in my results. How do I stop duplicates and get uniques instead. Here's the code. Someone please help....
select nalemme="select2" id="select2">
<option value="">Country</option>
<?php
do {
?>
<option value="<?php echo $row_associations['Site_ID']?>"><?php echo $row_associations['Bcode_Community']?></option>
<?php
} while ($row_associations = mysql_fetch_assoc($associations));
$rows = mysql_num_rows($associations);
if($rows > 0) {
mysql_data_seek($associations, 0);
$row_associations = mysql_fetch_assoc($associations);
}
?>
</select>
Copy link to clipboard
Copied
How do I stop duplicates and get uniques instead.
Use your SQL query to select only unique values:
SELECT DISTINCT thisColumn
FROM myTable
Copy link to clipboard
Copied
Thanks, I had thought of this and tried it but must have got my syntax wrong as it didn't work. Now I know i'm on the right track I'll try again.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more