Re: PHP & PostgreSQL

From: Diogo de Oliveira Biazus <diogo(at)ikono(dot)com(dot)br>
To: "Boget, Chris" <chris(at)wild(dot)net>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PHP & PostgreSQL
Date: 2002-12-30 12:52:56
Message-ID: 3E1041A8.9020807@ikono.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Boget, Chris wrote:<br>
<blockquote type="cite"
cite="mid4040BBE81A9AD411BD27009027887A7C0431BF(at)tiger(dot)wild(dot)net">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator"
content="MS Exchange Server version 5.5.2650.12">
<title>PHP &amp; PostgreSQL</title>
<p><font size="2">I'm switching from a MySQL environment to PGSQL and
I'm</font> <br>
<font size="2">going through and trying to learn the differences
between the</font> <br>
<font size="2">two.&nbsp; I've come across some issues that I can't seem
to find the</font> <br>
<font size="2">answers to in the docs or on the web.&nbsp; I'm hoping
someone can</font> <br>
<font size="2">help me out.</font></p>
</blockquote>
I'll try.<br>
<blockquote type="cite"
cite="mid4040BBE81A9AD411BD27009027887A7C0431BF(at)tiger(dot)wild(dot)net">
<p> </p>
<p><font size="2">* MySQL has a function to reset the result set so
that it can be</font> <br>
<font size="2">iterated through again - mysql_data_seek().&nbsp; I don't
see that there</font> <br>
<font size="2">is a similar function for PGSQL.&nbsp; Is that true?&nbsp; If
so, in order to</font> <br>
<font size="2">reset the result set you have to perform the query
again?&nbsp; Isn't</font> <br>
<font size="2">that a waste of resources?</font></p>
</blockquote>
In the PGSQL fetch functions, you usualy pass the row number<br>
as a parameter. So you can iterate through the table as many times<br>
as you want, just create a counter to control the iteration.<br>
<blockquote type="cite"
cite="mid4040BBE81A9AD411BD27009027887A7C0431BF(at)tiger(dot)wild(dot)net">
<p><font size="2">* For PGSQL, you can get the database name, the
field name</font> <br>
<font size="2">even the *host name* but you can't get the table name
from a</font> <br>
<font size="2">particular query?</font></p>
</blockquote>
I'm afraid that's true, at least I don't know such a function.<br>
<br>
But I advise you to try the PEAR DB extension from PHP,<br>
instead of using directly the database functions.<br>
<br>
my regards,<br>
<br>
<pre class="moz-signature" cols="72">--
Diogo de Oliveira Biazus
<a class="moz-txt-link-abbreviated" href="mailto:diogo(at)ikono(dot)com(dot)br">diogo(at)ikono(dot)com(dot)br</a>
Ikono Sistemas e Automa&ccedil;&atilde;o
<a class="moz-txt-link-freetext" href="http://www.ikono.com.br">http://www.ikono.com.br</a>
</pre>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 2.4 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message CoL 2002-12-30 12:58:06 Re: PHP & PostgreSQL
Previous Message Boget, Chris 2002-12-30 10:13:49 PHP & PostgreSQL