Thread: Strange browser behavior when querying PostgreSql database

Strange browser behavior when querying PostgreSql database

From
gras.christophe@libertysurf.fr (Chris FR)
Date:
Hi,

I have a problem in a php script :

when I execute it via Internet Explorer , sometimes the source is
complete (no problem), sometimes the source is incomplete (the html
page is cutted), and sometimes the browser doesn't display anything
and wait and wait and wait ....

The problem comes from a request I peform in this PHP script :

when I do the following request I have the problems quoted above :

SELECT a.* FROM a WHERE a.idf = b.id

I solved the problem by modifying the request :

SELECT a.* FROM a, b WHERE a.idf = b.id

Now the script works.

But I don't understand why the first request causes those problems ?

Is the first request has a correct syntax ? ( when submitted to
Postgres, there is no error message , and the results are displayed)
Is it due to PHP ? or PostgreSQL?


Thanks in advance,


Christophe Gras

Re: Strange browser behavior when querying PostgreSql database

From
"Grant Henderson"
Date:
Perhaps you are referencing a table (b) that has not been included?
-----Original Message-----
From: Chris FR [mailto:gras.christophe@libertysurf.fr]
Sent: 02 September 2003 15:50
To: pgsql-php@postgresql.org
Subject: [PHP] Strange browser behavior when querying PostgreSql
database


Hi,

I have a problem in a php script :

when I execute it via Internet Explorer , sometimes the source is
complete (no problem), sometimes the source is incomplete (the html page
is cutted), and sometimes the browser doesn't display anything and wait
and wait and wait ....

The problem comes from a request I peform in this PHP script :

when I do the following request I have the problems quoted above :

SELECT a.* FROM a WHERE a.idf = b.id

I solved the problem by modifying the request :

SELECT a.* FROM a, b WHERE a.idf = b.id

Now the script works.

But I don't understand why the first request causes those problems ?

Is the first request has a correct syntax ? ( when submitted to
Postgres, there is no error message , and the results are displayed) Is
it due to PHP ? or PostgreSQL?


Thanks in advance,


Christophe Gras

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Re: Strange browser behavior when querying PostgreSql database

From
Bruno Wolff III
Date:
On Tue, Sep 02, 2003 at 07:50:15 -0700,
  Chris  FR <gras.christophe@libertysurf.fr> wrote:
>
> SELECT a.* FROM a WHERE a.idf = b.id

You shouldn't use the above syntax as it is non standard and is more
commonly used by mistake than intentionally. People looking at your code
later will wonder what you were really trying to do.

> I solved the problem by modifying the request :
>
> SELECT a.* FROM a, b WHERE a.idf = b.id
>
> Now the script works.

I am not sure why there is a difference in these two cases. Possibly you
didn't give us the real queries and there is something else going on.

Re: Strange browser behavior when querying PostgreSql database

From
"Luis H"
Date:
Are you sure it freezes on the query? Could it be php code that uses the
results from the query that hang the system?

-L
----- Original Message -----
From: "Chris FR" <gras.christophe@libertysurf.fr>
To: <pgsql-php@postgresql.org>
Sent: Tuesday, September 02, 2003 10:50 AM
Subject: [PHP] Strange browser behavior when querying PostgreSql database


> Hi,
>
> I have a problem in a php script :
>
> when I execute it via Internet Explorer , sometimes the source is
> complete (no problem), sometimes the source is incomplete (the html
> page is cutted), and sometimes the browser doesn't display anything
> and wait and wait and wait ....
>
> The problem comes from a request I peform in this PHP script :
>
> when I do the following request I have the problems quoted above :
>
> SELECT a.* FROM a WHERE a.idf = b.id
>
> I solved the problem by modifying the request :
>
> SELECT a.* FROM a, b WHERE a.idf = b.id
>
> Now the script works.
>
> But I don't understand why the first request causes those problems ?
>
> Is the first request has a correct syntax ? ( when submitted to
> Postgres, there is no error message , and the results are displayed)
> Is it due to PHP ? or PostgreSQL?
>
>
> Thanks in advance,
>
>
> Christophe Gras
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>



Re: Strange browser behavior when querying PostgreSql database

From
Bruno Wolff III
Date:
On Tue, Sep 02, 2003 at 07:50:15 -0700,
  Chris  FR <gras.christophe@libertysurf.fr> wrote:
>
> SELECT a.* FROM a WHERE a.idf = b.id

You shouldn't use the above syntax as it is non standard and is more
commonly used by mistake than intentionally. People looking at your code
later will wonder what you were really trying to do.

> I solved the problem by modifying the request :
>
> SELECT a.* FROM a, b WHERE a.idf = b.id
>
> Now the script works.

I am not sure why there is a difference in these two cases. Possibly you
didn't give us the real queries and there is something else going on.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




Re: Strange browser behavior when querying PostgreSql database

From
"Luis H"
Date:
Are you sure it freezes on the query? Could it be php code that uses the
results from the query that hang the system?

-L
----- Original Message -----
From: "Chris FR" <gras.christophe@libertysurf.fr>
To: <pgsql-php@postgresql.org>
Sent: Tuesday, September 02, 2003 10:50 AM
Subject: [PHP] Strange browser behavior when querying PostgreSql database


> Hi,
>
> I have a problem in a php script :
>
> when I execute it via Internet Explorer , sometimes the source is
> complete (no problem), sometimes the source is incomplete (the html
> page is cutted), and sometimes the browser doesn't display anything
> and wait and wait and wait ....
>
> The problem comes from a request I peform in this PHP script :
>
> when I do the following request I have the problems quoted above :
>
> SELECT a.* FROM a WHERE a.idf = b.id
>
> I solved the problem by modifying the request :
>
> SELECT a.* FROM a, b WHERE a.idf = b.id
>
> Now the script works.
>
> But I don't understand why the first request causes those problems ?
>
> Is the first request has a correct syntax ? ( when submitted to
> Postgres, there is no error message , and the results are displayed)
> Is it due to PHP ? or PostgreSQL?
>
>
> Thanks in advance,
>
>
> Christophe Gras
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster




Re: Strange browser behavior when querying PostgreSql database

From
Gerd Terlutter
Date:
Chris FR wrote:
> when I execute it via Internet Explorer , sometimes the source is
> complete (no problem), sometimes the source is incomplete (the html
> page is cutted), and sometimes the browser doesn't display anything
> and wait and wait and wait ....

It looks like a typical M$ problem ;-)
most developers use Linux

> SELECT a.* FROM a WHERE a.idf = b.id
>
> I solved the problem by modifying the request :
>
> SELECT a.* FROM a, b WHERE a.idf = b.id
>
> Now the script works.
>
> But I don't understand why the first request causes those problems ?
>
> Is the first request has a correct syntax ? ( when submitted to
> Postgres, there is no error message , and the results are displayed)
> Is it due to PHP ? or PostgreSQL?
>
have you set
  error_reporting  =  E_ALL & ~E_NOTICE
in your php.ini ? and no error-output in a bad sql-statement?then i
don't know, but i think it's better to make joint-select with ...from
'all joint tables' where ...
bye, Gerd

--
--------------------------------------------------------
# Gerd Terlutter        | Mueller+Blanck Software GmbH #
# gerd@MplusB.de        | Gutenbergring 38             #
# gerd.terlutter@web.de | D-22848 Noderstedt           #
# tel:0171/6992579      | tel:+49 40 500 171-1         #
# Buero:040/500171-17   | fax:+49 40 500 171-71        #
--------------------------------------------------------



Re: Strange browser behavior when querying PostgreSql database

From
"Grant Henderson"
Date:
Perhaps you are referencing a table (b) that has not been included?
-----Original Message-----
From: Chris FR [mailto:gras.christophe@libertysurf.fr]
Sent: 02 September 2003 15:50
To: pgsql-php@postgresql.org
Subject: [PHP] Strange browser behavior when querying PostgreSql
database


Hi,

I have a problem in a php script :

when I execute it via Internet Explorer , sometimes the source is
complete (no problem), sometimes the source is incomplete (the html page
is cutted), and sometimes the browser doesn't display anything and wait
and wait and wait ....

The problem comes from a request I peform in this PHP script :

when I do the following request I have the problems quoted above :

SELECT a.* FROM a WHERE a.idf = b.id

I solved the problem by modifying the request :

SELECT a.* FROM a, b WHERE a.idf = b.id

Now the script works.

But I don't understand why the first request causes those problems ?

Is the first request has a correct syntax ? ( when submitted to
Postgres, there is no error message , and the results are displayed) Is
it due to PHP ? or PostgreSQL?


Thanks in advance,


Christophe Gras

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)