PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB » Bug #4226

DB_FETCHMODE_ORDERED, grouping and malformed query

Details

Submitted2005-04-26 16:26 UTC
Fromdaniel at konczyk dot net
StatusBogus
PackageDB
PHP Version4.3.10
OSDebian GNU/Linux
Roadmaps(Not assigned)

Comments

[2005-04-26 16:26 UTC] daniel at konczyk dot net

Description:
------------
I have a query like

select x, if (y != 0,1,0) as z from lala;

when i fetch the results using db->getANYTHING it works ok

BUT, recently, when I saw, that there is a grouping option, I wanted to try it

So I did db->getAssoc($sql,DB_FETCHMODE_ORDERED,true);
and I got an error, saying that I have error in my query, but i noticed, that the quoted query has "1=" instead of "!="

So, of course it's wrong
When I delete grouping flag, so leaving
$db->getAssoc($sql,DB_FETCHMODE_ORDERED);
it works fine

so that's the group flag, that's producing this bug
I haven't check the source yet - no time now...

I'm using latest DB version of course

[2005-04-26 16:33 UTC] daniel at konczyk dot net

Oh, I should add

[2005-04-26 16:34 UTC] daniel at konczyk dot net

ups...it's working..