On Sun, Mar 18, 2001 at 05:38:36PM -0800, Tom Beidler wrote:
> I'm trying to create a pulldown menu with distinct names from the found set.
> For some reason I never get the last name. Here's my code;
>
> $contact_query = "SELECT DISTINCT name FROM request"
> . " WHERE id <= '5' OR demo_id = '$demo_id'"
> . " ORDER BY name";
> $contact_result = mysql_query ($contact_query)
> or die ("Cannot build contact");
>
> while ($contact_row = mysql_fetch_array ($contact_result))
> {
> $name = $contact_row["name"];
> $option_contact .= "<OPTION value=\"$name\">$name</OPTION>\n";
> }
>
> What gives?
I have not seen anything wrong with this portion of code. Have you
tried echoing $contact_row["name"] inside the loop to make sure this is
the portion of your code that is broken?
--
Jason Stechschulte
[EMAIL PROTECTED]
--
All language designers are arrogant. Goes with the territory... :-)
-- Larry Wall in <[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]