Re: getting integer result from 4.1

Поиск
Список
Период
Сортировка
От brew@theMode.com
Тема Re: getting integer result from 4.1
Дата
Msg-id Pine.BSF.4.44.0212061337450.84038-100000@themode.com
обсуждение исходный текст
Ответ на getting integer result from 4.1  (Mark Nelson <MCN@cc.usu.edu>)
Список pgsql-php
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




В списке pgsql-php по дате отправления:

Предыдущее
От: Mark Nelson
Дата:
Сообщение: getting integer result from 4.1
Следующее
От: brew@theMode.com
Дата:
Сообщение: Re: getting integer result from 4.1