From: | Papp Gyozo <pgerzson(at)freestart(dot)hu> |
---|---|
To: | 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 20:43:17 |
Message-ID: | E175ul4-0000Vt-00@pompom.freestart.hu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
2002. május 9. 22:32 dátummal angelo(dot)rigo(at)globo(dot)com ezt írta:
>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
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.
>
>my code below is not working! any idea?
>
>printf ("<tr bgcolor='$bgcolor'><td>%s</td><td>%s</td><td><a
> href='mailto:$myrow[19]'>%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:
> http://www.zoom.com.br.
>
>
>---------------------------(end of
> broadcast)--------------------------- TIP 4: Don't 'kill -9' the
> postmaster
--
Papp, Győző
- pgerzson(at)freestart(dot)hu
From | Date | Subject | |
---|---|---|---|
Next Message | Surojit Niyogi | 2002-05-09 21:31:50 | Re: Mailtos and links from a query result table! |
Previous Message | angelo.rigo | 2002-05-09 20:32:37 | Mailtos and links from a query result table! |