From: Surojit Niyogi <surojit@bungeecode.com>
To: pgerzson@freestart.hu
Cc: angelo.rigo@globo.com
Cc: pgsql-php@postgresql.org
Subject: Re: Mailtos and links from a query result table!
Date: Thu, 09 May 2002 16:31:50 -0500
Message-ID: <3CDAEAC6.50205@bungeecode.com> (raw)
References: <3CD2936400024AD8@nplex.globo.com>
<E175ul4-0000Vt-00@pompom.freestart.hu>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-2">
<title></title>
</head>
<body>
Doing this would be good also if you expect to alter your table in the future.
<br>
<br>
-Surojit<br>
<br>
Papp Gyozo wrote:<br>
<blockquote type="cite" cite="midE175ul4-0000Vt-00@pompom.freestart.hu">
<pre wrap="">2002. május 9. 22:32 dátummal <a class="moz-txt-link-abbreviated" href="mailto:angelo.rigo@globo.com">angelo.rigo@globo.com</a> ezt írta:
</pre>
<blockquote type="cite">
<pre wrap="">Hi!
I need to make mailtos and hiperlinks in a query result table
i dont know wich variable to pass to the <a href =""> to make this
happen
</pre>
</blockquote>
<pre wrap=""><!---->
I suggest to you using named fields.You can achieve this by calling
pg_fetch_array with PGSQL_ASSOC parameter (or pg_fetch_object())
$myrow = pg_fetch_array($result, $row, PGSQL_ASSOC);
Then you can use $myrow['email'], etc, whatever you named those columns
in postgres.
</pre>
<blockquote type="cite">
<pre wrap="">my code below is not working! any idea?
printf ("<tr bgcolor='$bgcolor'><td>%s</td><td>%s</td><td><a
href='<a class="moz-txt-link-freetext" href="mailto:$myrow[19">mailto:$myrow[19</a>]'>%s</a></td><td><a
href="$myrow[9]">%s</a></td><td>%s</td><td>%s</td></tr>
",$myrow[1], $myrow[2], $myrow[3], $myrow[19], $myrow[9], $myrow[10]);
$row++;
}
while ($row < $numrows);
printf ("</table>
");
pg_close($db);
?>
________________________________________
A busca mais veloz e precisa da internet. Acesse agora:
<a class="moz-txt-link-freetext" href="http://www.zoom.com.br">http://www.zoom.com.br</a;.
---------------------------(end of
broadcast)--------------------------- TIP 4: Don't 'kill -9' the
postmaster
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
</body>
</html>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: surojit@bungeecode.com, pgerzson@freestart.hu, angelo.rigo@globo.com
Subject: Re: Mailtos and links from a query result table!
In-Reply-To: <3CDAEAC6.50205@bungeecode.com>
References: <3CD2936400024AD8@nplex.globo.com> <E175ul4-0000Vt-00@pompom.freestart.hu> <3CDAEAC6.50205@bungeecode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox