Re: [PHP-DB] Another Drop down question

2002-03-27 Thread Kim Kohen

G'day szii,

> The easiest way...
>> $getlist = mysql_query("SELECT distinct Writer FROM stories");
>> echo " \n";
>  echo "Search All";

I love simple solutions:)

Cheers and  many thanks

kim


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Another Drop down question

2002-03-27 Thread szii

The easiest way...

> $getlist = mysql_query("SELECT distinct Writer FROM stories");
> echo " \n";

   echo "Search All";
 
> while ($row = mysql_fetch_array($getlist)) {
> echo ' '.$row["Writer"]."\n";
> }
> echo " \n";

-Szii

- Original Message - 
From: "Kim Kohen" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 5:18 PM
Subject: [PHP-DB] Another Drop down question


> Hello all,
> 
> I'm trying for the first time to use a dynamically created popup menu from a
> mysql database.  The menu is of (article) writers' names and will be used in
> a select query.
> 
> Using snippets of code I've gleaned from here and the mysql list, I've the
> popup working fine but I'd like to include either a blank entry or a 'Search
> all Writers' entry in the menu and this is where I'm stuck.
> 
> The code I have is:
> 
> $getlist = mysql_query("SELECT distinct Writer FROM stories");
> echo " \n";
> while ($row = mysql_fetch_array($getlist)) {
> echo ' '.$row["Writer"]."\n";
> }
> echo " \n";
> 
> If anyone could point me in the right direction or direct me to appropriate
> documentation I'd be most appreciative.
> 
> Cheers and thanks
> 
> kim
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Another Drop down question

2002-03-27 Thread Kim Kohen

Hello all,

I'm trying for the first time to use a dynamically created popup menu from a
mysql database.  The menu is of (article) writers' names and will be used in
a select query.

Using snippets of code I've gleaned from here and the mysql list, I've the
popup working fine but I'd like to include either a blank entry or a 'Search
all Writers' entry in the menu and this is where I'm stuck.

The code I have is:

$getlist = mysql_query("SELECT distinct Writer FROM stories");
echo " \n";
while ($row = mysql_fetch_array($getlist)) {
echo ' '.$row["Writer"]."\n";
}
echo " \n";

If anyone could point me in the right direction or direct me to appropriate
documentation I'd be most appreciative.

Cheers and thanks

kim


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php