Re: psql with PHP question - Mailing list pgsql-php

From Jesus Aneiros
Subject Re: psql with PHP question
Date
Msg-id Pine.LNX.4.10.10105050824290.16295-100000@ucfinfo.ucf.edu.cu
Whole thread Raw
In response to Re: psql with PHP question  ("Gyozo Papp" <pgerzson@freestart.hu>)
List pgsql-php
On Thu, 3 May 2001, Gyozo Papp wrote:

> In my opinion, these queries make the same :
> SELECT id FROM article WHERE id=(SELECT MAX(id) FROM article);
> SELECT MAX(id) FROM article;
>
> but the latter one is much more simple and you do not overload your pg.
> (by the way, I think id = (SELECT ...) isn't handled gracefully.)

Hi, although I agreee with the first part: the subselect is redundat in
this case, I don't understand de second one. The subselect will return one
value, or am I wrong? So, I think the operator = will be correct, or not?

Saludos, jesus.



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl




pgsql-php by date:

Previous
From: "Christian Marschalek"
Date:
Subject: PHP calling PHP?
Next
From: "Gyozo Papp"
Date:
Subject: Re: PHP calling PHP?