Home » Database » DB » Bug #4226
DB_FETCHMODE_ORDERED, grouping and malformed query
Details
| Submitted | 2005-04-26 16:26 UTC |
|---|---|
| From | daniel at konczyk dot net |
| Status | Bogus |
| Package | DB |
| PHP Version | 4.3.10 |
| OS | Debian 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..