Try this
Table : col1 : col2
1. Hotel 1
select name = my_selection
?php
include config.php;
$res = mysql_query(SELECT * FROM tname);
while ($row = mysql_fetch_array($res))
{
$col1 = $row[col1];
$col2 = $row[col2];
option value = \$col1\ $col2
}
/select
?
Pradeep
Naharonline.com
- Original Message -
From: savaidis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 02, 2002 1:37 PM
Subject: get one name for each row
I have one table with about 1000 hotels and name or the city they belong.
I want to run a query to get one row for every city only, to put it in a
pull down menu in the search form.
How is that?
Makis
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php