cvs: pear /DB/DB pgsql.php

From: Date: Fri, 23 Aug 2002 08:30:24 +0000
Subject: cvs: pear /DB/DB pgsql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5891@lists.php.net to get a copy of this message
mj Fri Aug 23 04:30:24 2002 EDT Modified files: /pear/DB/DB pgsql.php Log: * Suppress some potential warnings. Index: pear/DB/DB/pgsql.php diff -u pear/DB/DB/pgsql.php:1.8 pear/DB/DB/pgsql.php:1.9 --- pear/DB/DB/pgsql.php:1.8 Tue Aug 6 11:43:57 2002 +++ pear/DB/DB/pgsql.php Fri Aug 23 04:30:24 2002 @@ -17,7 +17,7 @@ // | Stig Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.8 2002/08/06 15:43:57 cox Exp $ +// $Id: pgsql.php,v 1.9 2002/08/23 08:30:24 mj Exp $ // // Database independent query interface definition for PHP's PostgreSQL // extension. @@ -595,39 +595,39 @@ { $field_name = @pg_fieldname($resource, $num_field); - $result = pg_exec($this->connection, "SELECT f.attnotnull, f.atthasdef + $result = @pg_exec($this->connection, "SELECT f.attnotnull, f.atthasdef FROM pg_attribute f, pg_class tab, pg_type typ WHERE tab.relname = typ.typname AND typ.typrelid = f.attrelid AND f.attname = '$field_name' AND tab.relname = '$table_name'"); - if (pg_numrows($result) > 0) { - $row = pg_fetch_row($result, 0); + if (@pg_numrows($result) > 0) { + $row = @pg_fetch_row($result, 0); $flags = ($row[0] == 't') ? 'not_null ' : ''; if ($row[1] == 't') { - $result = pg_exec($this->connection, "SELECT a.adsrc + $result = @pg_exec($this->connection, "SELECT a.adsrc FROM pg_attribute f, pg_class tab, pg_type typ, pg_attrdef a WHERE tab.relname = typ.typname AND typ.typrelid = f.attrelid AND f.attrelid = a.adrelid AND f.attname = '$field_name' AND tab.relname = '$table_name'"); - $row = pg_fetch_row($result, 0); + $row = @pg_fetch_row($result, 0); $num = str_replace('\'', '', $row[0]); $flags .= "default_$num "; } } - $result = pg_exec($this->connection, "SELECT i.indisunique, i.indisprimary, i.indkey + $result = @pg_exec($this->connection, "SELECT i.indisunique, i.indisprimary, i.indkey FROM pg_attribute f, pg_class tab, pg_type typ, pg_index i WHERE tab.relname = typ.typname AND typ.typrelid = f.attrelid AND f.attrelid = i.indrelid AND f.attname = '$field_name' AND tab.relname = '$table_name'"); - $count = pg_numrows($result); + $count = @pg_numrows($result); for ($i = 0; $i < $count ; $i++) { - $row = pg_fetch_row($result, $i); + $row = @pg_fetch_row($result, $i); $keys = explode(" ", $row[2]); if (in_array($num_field + 1, $keys)) { @@ -702,7 +702,7 @@ // table without a resultset if (is_string($result)) { - $id = pg_exec($this->connection,"SELECT * FROM $result"); + $id = @pg_exec($this->connection,"SELECT * FROM $result"); if (empty($id)) { return $this->pgsqlRaiseError(); }

« previous php.pear.cvs (#5891) next »