>> Is it possible to have a function which echoes the values as they are
>> read from the database?
>
>something like
>
>function init_auth_list()
> {
> print " select the name of
>the author";
> $query="select name from author order by name";
> $result=pg_exec($GLOBALS[
... or even shorter (since php 4.1.0):
function init_auth_list()
{
print " select the name of the
author";
$query="select name from author order by name";
$result=pg_exec($GLOBALS["db"],$query);
while ($row = pg_fetch_row($result))
{
print "$row[0]";
}
print "";
> Is it possible to have a function which echoes the values as they are
> read from the database?
something like
function init_auth_list()
{
print " select the name of
the author";
$query="select name from author order by name";
$result=pg_exec($GLOBALS["db"],$quer
Hi,
I want to dynamically generate a drop down list of "authors" by querying
a database. What I am doing at present is:
function init_auth_list($auth_list)
{
$auth_list=" select the
name of t
he author";
$query="select name from author order by name";
$result=pg_exec($GLOBA
4 matches
Mail list logo