cvs: pear /DB/DB pgsql.php
| From: | Jon Parise | Date: | Fri, 07 Feb 2003 04:41:19 +0000 |
| Subject: | cvs: pear /DB/DB pgsql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8739@lists.php.net to get a copy of this message | ||
jon Thu Feb 6 23:41:19 2003 EDT
Modified files:
/pear/DB/DB pgsql.php
Log:
$repeat is used as a boolean in this context, so assign it 'true' and
'false' instead of 1 and 0, respectively. This makes $repeat's role in
this (somewhat hairy) block of code a little more apparent.
Index: pear/DB/DB/pgsql.php
diff -u pear/DB/DB/pgsql.php:1.15 pear/DB/DB/pgsql.php:1.16
--- pear/DB/DB/pgsql.php:1.15 Thu Jan 9 15:07:15 2003
+++ pear/DB/DB/pgsql.php Thu Feb 6 23:41:19 2003
@@ -17,7 +17,7 @@
// | Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: pgsql.php,v 1.15 2003/01/09 20:07:15 ssb Exp $
+// $Id: pgsql.php,v 1.16 2003/02/07 04:41:19 jon Exp $
//
// Database independent query interface definition for PHP's PostgreSQL
// extension.
@@ -492,20 +492,20 @@
function nextId($seq_name, $ondemand = true)
{
$seqname = $this->getSequenceName($seq_name);
- $repeat = 0;
+ $repeat = false;
do {
$this->pushErrorHandling(PEAR_ERROR_RETURN);
$result = $this->query("SELECT NEXTVAL('${seqname}')");
$this->popErrorHandling();
if ($ondemand && DB::isError($result) &&
$result->getCode() == DB_ERROR_NOSUCHTABLE) {
- $repeat = 1;
+ $repeat = true;
$result = $this->createSequence($seq_name);
if (DB::isError($result)) {
return $this->raiseError($result);
}
} else {
- $repeat = 0;
+ $repeat = false;
}
} while ($repeat);
if (DB::isError($result)) {