Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Posts
    32

    Question Unanswered: Populate listbox using PHP, MySQL, No duplicates?

    I'm new to PHP and MySQL.

    I found an optionblock piece of code that creates a listbox from info in MySQL.


    while ($row = mysql_fetch_array($sql_result)) {

    $Release = $row["Release"];
    $option_block .= "<OPTION value=\"$Release\">$Release</OPTION>";

    }

    The code works, but it doesn't check for duplicates. How do I weed out duplicates?

    Thanks!

  2. #2
    Join Date
    Oct 2002
    Posts
    32

    Re: Populate listbox using PHP, MySQL, No duplicates?

    Found resolution to this one. Add DISTINCT to sql query.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •