Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records! - Mailing list pgsql-php

From Gavin M. Roy
Subject Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!
Date
Msg-id 5807B3E2-F486-47CB-B8AB-5D20ABD6FD65@ehpg.net
Whole thread Raw
In response to Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!  (babak badaei <badaei@yahoo.com>)
Responses Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!
Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!
List pgsql-php
Have you tried with pdo?

$pdo = new PDO('pgsql:host=localhost;dbname=database','web');
$query = $pdo->query('SELECT * FROM foobar;');
$query->execute();
$data = $query->fetchAll(PDO::FETCH_OBJ);
print_r($data);

And have you tried not using other peoples packages but downloading
the source and compiling it?  I run PHP 5.1.4 and work with very
large data sets, though I've not upgraded to 5.1.6 yet.

Hope this helps,

Gavin


On Aug 31, 2006, at 12:42 AM, babak badaei wrote:

> Hi Chris, Run through the native client everything works fine. I
> know, its really strange. Any ideas?
>
> ----- Original Message ----
> From: Chris <dmagick@gmail.com>
> To: babak badaei <badaei@yahoo.com>
> Cc: pgsql-php@postgresql.org
> Sent: Wednesday, August 30, 2006 11:42:01 PM
> Subject: Re: [PHP] Postgres 8.1.4 + PHP, hangs when querying more
> than 16 records!
>
> babak badaei wrote:
>> OS: Fedora Core 5
>> PHP: PHP 5.1.4, PHP 5.1.6, and  PHP 4.4.4 (compiled with --with-
>> pgsql and install as binaries using YUM)
>> Postgres 8.1.4
>>
>> This scripts works:
>> ---------------------------------------------------------------------
>> ------------
>> <?php
>> // Connecting, selecting database
>> $dbconn = pg_connect("host=localhost dbname=database user=web")
>>    or die('Could not connect: ' . pg_last_error());
>>
>> // Performing SQL query
>> $query = 'SELECT * FROM foobar limit 16';
>
> <snip>
>
>>  // Performing SQL query
>>  $query = 'SELECT * FROM foobar limit 17';
>
> That seems really weird.
>
> If you run those through psql natively what happens?
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend


pgsql-php by date:

Previous
From: babak badaei
Date:
Subject: Fw: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!
Next
From: babak badaei
Date:
Subject: Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!