ID: 29180
Updated by: [EMAIL PROTECTED]
Reported By: tila at home dot nl
-Status: Open
+Status: Bogus
Bug Type: PostgreSQL related
Operating System: Linux 2.4.24
PHP Version: 5.0.4-pre
New Comment:
No crash -> no bug. (and with give information impossible to reproduce
if there even was one.) Looks more like user error..
Previous Comments:
------------------------------------------------------------------------
[2004-12-30 18:10:19] tila at home dot nl
When I add a line in the script so that it reads:
<?php
$db = pg_connect("host=localhost user=apache password=apache
dbname=groupware");$QUERY = "SELECT o.* FROM personoverview o";
$result = pg_exec($QUERY);
$total = pg_numrows($result);
$offset = $_GET['id']?$_GET['id']:0;
$temp_offset = $offset
$perpage = 10;
for ($i = $offset; (($i < $total) && ($i < ($offset + $perpage)));
$i++)
{
$row = pg_fetch_row($result, $i);
}
echo $offset;
?>
The result will display 5. Strange
------------------------------------------------------------------------
[2004-12-29 23:54:25] tila at home dot nl
php5-STABLE-200412231730
tried this one, it still returns 42, can I do something else to help
you solve it, with some debugger or so?
------------------------------------------------------------------------
[2004-07-18 00:33:45] tila at home dot nl
42 by the way is the number of records in the database. So $offset
takes the value of $total
------------------------------------------------------------------------
[2004-07-16 10:34:23] tila at home dot nl
No, When I remove the PEAR::DB class and the code that's using it, it
will display '5' just as expected.
When I use pg_exec and pg_fetch_row etc.. the result displays '42' ????
<?php
$db = pg_connect("host=localhost user=apache password=apache
dbname=groupware");$QUERY = "SELECT o.* FROM personoverview o";
$result = pg_exec($QUERY);
$total = pg_numrows($result);
$offset = $_GET['id']?$_GET['id']:0;
$perpage = 10;
for ($i = $offset; (($i < $total) && ($i < ($offset + $perpage)));
$i++) {
$row = pg_fetch_row($result, $i);
}
echo $offset;
?>
------------------------------------------------------------------------
[2004-07-16 00:59:04] [EMAIL PROTECTED]
does it also crash when NOT using the PEAR::DB class?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29180
--
Edit this bug report at http://bugs.php.net/?id=29180&edit=1