Re: Mailtos and links from a query result table!

From: Surojit Niyogi <surojit(at)bungeecode(dot)com>
To: pgerzson(at)freestart(dot)hu
Cc: angelo(dot)rigo(at)globo(dot)com, pgsql-php(at)postgresql(dot)org
Subject: Re: Mailtos and links from a query result table!
Date: 2002-05-09 21:31:50
Message-ID: 3CDAEAC6.50205@bungeecode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

<!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(at)pompom(dot)freestart(dot)hu">
<pre wrap="">2002. május 9. 22:32 dátummal <a class="moz-txt-link-abbreviated" href="mailto:angelo(dot)rigo(at)globo(dot)com">angelo(dot)rigo(at)globo(dot)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 &lt;a href =""&gt; 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 ("&lt;tr bgcolor='$bgcolor'&gt;&lt;td&gt;%s&lt;/td&gt;&lt;td&gt;%s&lt;/td&gt;&lt;td&gt;&lt;a
href='<a class="moz-txt-link-freetext" href="mailto:$myrow[19">mailto:$myrow[19</a>]'&gt;%s&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a
href="$myrow[9]"&gt;%s&lt;/a&gt;&lt;/td&gt;&lt;td&gt;%s&lt;/td&gt;&lt;td&gt;%s&lt;/td&gt;&lt;/tr&gt;
",$myrow[1], $myrow[2], $myrow[3], $myrow[19], $myrow[9], $myrow[10]);
$row++;
}
while ($row &lt; $numrows);
printf ("&lt;/table&gt;
");
pg_close($db);
?&gt;

________________________________________
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>

Attachment Content-Type Size
unknown_filename text/html 2.0 KB

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Keary Suska 2002-05-09 22:13:12 Re: Mailtos and links from a query result table!
Previous Message Papp Gyozo 2002-05-09 20:43:17 Re: Mailtos and links from a query result table!