Re: getting integer result from 4.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Mark.....

>         $update = //this is where I execute the query
> 	$updates = pg_fetch_row($update, 0);
> 	echo "rows updated=".$updates[0]."<br>";
>
> But that blows up with
> Warning: Unable to jump to row 0 on PostgreSQL result index 6 in
> my php doc.

....probably because there is nothing returned from your query (there is
no row zero, or any other row).

Check into the PHP PostgreSQL funtion pg_numrows docs at php.net (or
pg_num_rows, the name has recently changed depending on which version PHP
you are using).

I usually query, then check the number of rows and loop through them only
if something is returned, else I print out a 'Nothing Found' type of
message.

brew





[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux