[PHP] Warning Message using pg_***

2002-07-11 Thread David Busby

List,
I'm using PG functions like below and I'm wondering how to get rid of 
that dang Warning message?  PHP.ini setting? or can I turn on/off error 
checking?

$rs is the result from pg_exec() (inside the other function)

[PHP Code]
$rs = get_database_stuff(list);
$irow = 0;
while ($ec = pg_fetch_object($rs, $irow)) {
printf(option value=\%s\, $ec-uuid);
if ($ec_uuid == $ec-uuid) { printf( selected); }
printf(%s/option\n, $ec-name);
$irow++;
}
[Resulting HTML]
option value=C878CD32A3DB4CC98DEF1D5E1BCD4E30Zhuhai Formula One/option
br
bWarning/b:  Unable to jump to row 920 on PostgreSQL result index 3 
in b/var/www/html/default.php/b on line b89/bbr
/select/td/tr


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Warning Message using pg_***

2002-07-11 Thread Analysis Solutions

On Thu, Jul 11, 2002 at 11:14:24AM -0700, David Busby wrote:

   I'm using PG functions like below and I'm wondering how to get rid 
   of that dang Warning message?  PHP.ini setting? or can I turn on/off error 
 checking?
... snip ...
 bWarning/b:  Unable to jump to row 920 on PostgreSQL result index 3 
 in b/var/www/html/default.php/b on line b89/bbr
 /select/td/tr

Write your code so it doesn't go to a non existent row in the result set?  
At least that's what it looks like to my non-pg-user eyes.


   printf(option value=\%s\, $ec-uuid);

Uh, why are you using printf rather than just echoing?  Kind of wasteful, 
let alone harder to read.

echo option value=\$ec-uuid\;

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php