Date: 11/29/01
- Next message: Marc: "[PHP-DB] Database-Independent API with PHP"
- Previous message: Mark C. Farrington: "Re: [PHP-DB] Converting MySOL query results into form elements."
- In reply to: GIS: "RE: [PHP-DB] Converting MySOL query results into form elements."
- Next in thread: Daniel Barton: "Re: [PHP-DB] Converting MySOL query results into form elements."
- Reply: Daniel Barton: "Re: [PHP-DB] Converting MySOL query results into form elements."
- Reply: Mark C. Farrington: "Re: [PHP-DB] Converting MySOL query results into form elements."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks for the quick response, but I'm still having a bit of difficulty with
it.
I'll go into a bit more detail:
I have my database and what I need in the dropdown is the results of a query
on the field unit_tag in a table named unit_name.
I see how the code snippet creates the dropdown box but I'm still fuzzy on
how to pass the query results.
----- Original Message -----
From: "Richard Hillström (GIS)" <Richard.Hillstrom <email protected>>
To: "'Mark C. Farrington'" <alareth <email protected>>; <php-db <email protected>>
Sent: Thursday, November 29, 2001 9:31 AM
Subject: RE: [PHP-DB] Converting MySOL query results into form elements.
> I solved it like this:
>
> echo "<SELECT NAME='databasename'>";
> while($row = sybase_fetch_array($dbresult)) {
> $r0 = $row[0];
> echo "<OPTION VALUE='$r0'>$r0</OPTION>";
> }
> echo "</SELECT><BR>";
>
>
> //Richard
>
> -----Original Message-----
> From: Mark C. Farrington [mailto:alareth <email protected>]
> Sent: Thursday, November 29, 2001 3:25 PM
> To: php-db <email protected>
> Subject: [PHP-DB] Converting MySOL query results into form elements.
>
>
> What I need to do is query a MySQL db and turn the results into a dropdown
box on a form.
>
> I've been paging through my books and I've come accross the command
writeOptionList which seems to be what I'm looking for but I'm not sure how
to use it.
>
> Self taught programming is a joy eh?
>
> Mark C. Farrington
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Marc: "[PHP-DB] Database-Independent API with PHP"
- Previous message: Mark C. Farrington: "Re: [PHP-DB] Converting MySOL query results into form elements."
- In reply to: GIS: "RE: [PHP-DB] Converting MySOL query results into form elements."
- Next in thread: Daniel Barton: "Re: [PHP-DB] Converting MySOL query results into form elements."
- Reply: Daniel Barton: "Re: [PHP-DB] Converting MySOL query results into form elements."
- Reply: Mark C. Farrington: "Re: [PHP-DB] Converting MySOL query results into form elements."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

