PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB » Bug #386

query hangs

Details

Submitted2003-12-09 09:55 UTC
Fromwarpje at yahoo dot com
StatusBogus
PackageDB
PHP Version4.3.3
OSWindows NT
Roadmaps(Not assigned)

Comments

[2003-12-09 09:55 UTC] warpje at yahoo dot com

Description:
------------
Query doesn't work with DB while it works with standard php mysql. After issuing:

echo "BEFORE";
if(!($result = $db_object->query($query))){
die("ERROR");
}
echo "HI";

Nothing comes out of it. seems like it dies. I neither see ERROR or HI printed on the screen, while I see before.

Reproduce code:
---------------
SELECT pt.pt
, (regels.pick_date) as pick_date
, (ship.ship_date) as ship_date
, sum(aant_gepick) as aantal
FROM ( pt left join regels on pt.pt=regels.pt ) left join ship on pt.pt=ship.pt
where (pick_date between '2003-12-1' and '2003-12-15')
and ( (ship_date not between '2003-12-1' and '2003-12-15')
or (ship_date is null) )
group by pt.pt order by pick_date ;

[2003-12-09 09:57 UTC] warpje at yahoo dot com

Description:
------------
Query doesn't work with DB while it works with standard php mysql. After
issuing:

echo "BEFORE";
if(!($result = $db_object->query($query))){
die("ERROR");
}
echo "HI";

Nothing comes out of it. seems like it dies. I neither see ERROR or HI
printed on the screen, while I see before.

Reproduce code:
---------------
SELECT pt.pt
, max(regels.pick_date) as pick_date
, max(ship.ship_date) as ship_date
, sum(aant_gepick) as aantal
FROM ( pt left join regels on pt.pt=regels.pt ) left join ship
on pt.pt=ship.pt
where (pick_date between '2003-12-1' and '2003-12-15')
and ( (ship_date not between '2003-12-1' and '2003-12-15')

or (ship_date is null) )
group by pt.pt order by pick_date ;

[2003-12-09 10:42 UTC] warpje at yahoo dot com

In mysql.php::simpleQuery($query) there is a line:
$result = @mysql_query($query, $this->connection);

it seems to work after changing it to:
$result = @mysql_query($query);//, $this->connection);

Why is that? And why does it work with other queries?

Thanks,
Jeroen

[2003-12-09 11:11 UTC] warpje at yahoo dot com

Problem was timing. After setting:
set_time_limit(0);

The problem went away. I don't understand why, because php used to give a warning when timer went of.

Sorry for the misplaced bug.

Jeroen