Re: Query Problems with PDO, PDO_PGSQL
| From: | Gavin Roy | Date: | Fri, 25 Feb 2005 22:54:08 +0000 |
| Subject: | Re: Query Problems with PDO, PDO_PGSQL | ||
| References: | 1 2 3 4 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-2067@lists.php.net to get a copy of this message | ||
I meant the PDO PECL modules :p I'll play with the php-5.1 on this
machine, as I have problems with php-5.0.3, PDO, and PDO_PGSQL on an
AMD64 (it segfaults).
Gavin
On Fri, 25 Feb 2005 23:50:17 +0100, Edin Kadribasic <edink@emini.dk> wrote:
> Yes, but PECL package releases are not being made daily, so if you want
> to test latest and the greatest PDO php-5.1 snaps are the way to go.
>
> And no, PECL modules are not going to be depreciated after 5.1 release.
>
> Edin
>
> On Feb 25, 2005, at 23:45, Gavin Roy wrote:
>
> > Will this be pushed into the PECL PDO module? Or is the PECL module
> > going to be deprecated come 5.1?
> >
> > Gavin
> >
> > On Fri, 25 Feb 2005 23:42:16 +0100, Edin Kadribasic <edink@emini.dk>
> > wrote:
> >> Could you please try the latest php-5.1 snap (which now includes pdo
> >> so none
> >> of the pear install problems). I belive that this bug was already
> >> solved.
> >> (http://pecl.php.net/bugs/bug.php?id=3478)
> >>
> >> Edin
> >>
> >> ----- Original Message -----
> >> From: "Gavin Roy" <gmr.pear@gmail.com>
> >> To: <pecl-dev@lists.php.net>
> >> Sent: Thursday, February 24, 2005 10:42 PM
> >> Subject: [PECL-DEV] Query Problems with PDO, PDO_PGSQL
> >>
> >>> I believe there's a bug with using database side functions in a
> >>> SELECT
> >>> with PDO_PGSQL. When I issue the following query in psql I get the
> >>> results as such:
> >>>
> >>> framewerk_www=> SELECT a.category, count(b.cmskey) AS cnt FROM
> >>> cms_categories AS a LEFT JOIN cms_keys AS b ON b.category =
> >>> a.category
> >>> GROUP BY a.category ORDER BY a.category;
> >>> category | cnt
> >>> -------------------+-----
> >>> Documentation | 7
> >>> Public | 13
> >>> Site Instructions | 5
> >>> (3 rows)
> >>>
> >>> However the following code produces the results with nothing in the
> >>> "cnt" column:
> >>>
> >>> $query = $this->PDO->prepare("SELECT a.category,
> >>> count(b.cmskey) AS cnt FROM cms_categories AS a LEFT JOIN cms_keys AS
> >>> b ON b.category = a.category GROUP BY a.category ORDER BY
> >>> a.category;");
> >>> $query->Execute();
> >>> $rows = $query->fetchAll(PDO_FETCH_OBJ);
> >>> print_r($rows);
> >>>
> >>> Array
> >>> (
> >>> [0] => stdClass Object
> >>> (
> >>> [category] => Documentation
> >>> [cnt] =>
> >>> )
> >>>
> >>> [1] => stdClass Object
> >>> (
> >>> [category] => Public
> >>> [cnt] =>
> >>> )
> >>>
> >>> [2] => stdClass Object
> >>> (
> >>> [category] => Site Instructions
> >>> [cnt] =>
> >>> )
> >>>
> >>> )
> >>>
> >>> Likewise if I change fetchAll to include no parameters:
> >>>
> >>> Array
> >>> (
> >>> [0] => Array
> >>> (
> >>> [category] => Documentation
> >>> [0] => Documentation
> >>> [cnt] =>
> >>> [1] =>
> >>> )
> >>>
> >>> [1] => Array
> >>> (
> >>> [category] => Public
> >>> [0] => Public
> >>> [cnt] =>
> >>> [1] =>
> >>> )
> >>>
> >>> [2] => Array
> >>> (
> >>> [category] => Site Instructions
> >>> [0] => Site Instructions
> >>> [cnt] =>
> >>> [1] =>
> >>> )
> >>>
> >>> )
> >>>
> >>> Also please be aware I believe there is still a pear installation
> >>> issue with PDO having to do with case sensitivity. when you do a
> >>> pear
> >>> install pdo_pgsql-beta it looks to see if "pdo" is installed. But
> >>> pear only sees "PDO" installed, and says it's not.
> >>>
> >>> Gavin
> >>>
> >>> --
> >>> PECL development discussion Mailing List (http://pecl.php.net/)
> >>> To unsubscribe, visit:
> >>> http://www.php.net/unsub.php
> >>>
> >>>
> >>>
> >>
> >>
> >
>
>