|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-01-28 10:44 UTC] sander@php.net
[2002-03-01 00:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 21:00:01 2025 UTC |
Hi.. I'm a user off Postgresql, and the problem is with a a data type (decimal). ------- $query_resultren=pg_exec ($connection,$queryren); $ren=pg_result($query_resultren, 0, 0); $number_rows_queryren = pg_numrows($query_resultren); //echo "ren=$ren<br>"; if (!$ren) { -------- Ok, the problem is in "$ren" the result is 0.0, and for me 0.0=0 (or no), i tried: if ($ren=0) if ($ren==0) if ($ren==0.0) if ($ren=="0.0") but nothing!!! My solution in this case is: ------- $query_resultren=pg_exec ($connection,$queryren); $ren=""""round""""(pg_result($query_resultren, 0, 0)); $number_rows_queryren = pg_numrows($query_resultren); //echo "ren=$ren<br>"; if (!$ren) { -------- and this work...