Re: [PHP4BETA] COM problem
| From: | gus | Date: | Thu, 06 Apr 2000 07:51:29 +0000 |
| Subject: | Re: [PHP4BETA] COM problem | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-13212@lists.php.net to get a copy of this message | ||
Zeev Suraski schrieb:
> I think I know what the problem is. Can you try to see if you
> reliably get opposite results (i.e., that it gives you exactly
> the opposite result from the correct one, consistently?)
Yes, I always get opposite results of the correct comparison but
that's only true for "greater than" comparisons (sorry, please let me
know the correct english word for it). "lower than" results are always
correct. Below is my test code and some outputs.
Guido
$rc = $rs->RecordCount;
$ps = $rs->PageSize;
echo "RecordCount: ".$rs->RecordCount."<br>\n";
echo "PageSize: ".$rs->PageSize."<br>\n";
echo "RecordCount>PageSize:
".($rs->RecordCount>$rs->PageSize)."<br>\n";
echo "RecordCount<PageSize:
".($rs->RecordCount<$rs->PageSize)."<br>\n";
echo "rc>ps: ".($rc>$ps)."<br>\n";
echo "rc<ps: ".($rc<$ps)."<br>\n";
RecordCount: 72
PageSize: 10
RecordCount>PageSize: 0
RecordCount<PageSize: 0
rc>ps: 1
rc<ps: 0
RecordCount: 2
PageSize: 10
RecordCount>PageSize: 1
RecordCount<PageSize: 1
rc>ps: 0
rc<ps: 1
RecordCount: 72
PageSize: 80
RecordCount>PageSize: 1
RecordCount<PageSize: 1
rc>ps: 0
rc<ps: 1
> At 10:58 05/04/2000 , gus wrote:
> >Hi!
> >
> >I have a problem with PHP4 RC1 and COM.
> >
> >$rs is a RecordSet COM object;
> >The value of $rs->RecordCount is 60.
> >The value of $rs->PageSize is 10.
> >
> >This comparison does NOT work:
> > if ($rs->RecordCount>$rs->PageSize) { ...
> >
> >This works:
> > $rc = $rs->RecordCount;
> > $ps = $rs->PageSize;
> > if ($rc>$ps) { ...
> >
> >Does anybody have an idea about that?
> >
> >Regards
> > Guido