Re:
| От | Oliver Elphick |
|---|---|
| Тема | Re: |
| Дата | |
| Msg-id | 1071751795.22842.1.camel@braydb обсуждение исходный текст |
| Ответ на | ("Mace, Richard" <richard.mace@Lorien.co.uk>) |
| Ответы |
Re:
|
| Список | pgsql-novice |
On Thu, 2003-12-18 at 08:40, Mace, Richard wrote:
>
> $sth = $dbh->prepare("SELECT telephone from sample");
> $sth->execute();
> $sth->bind_columns(undef, \$telephone);
> while ( $sth->fetch ) {
> print STDERR "$telephone\n";
> }
> $sth->finish;
>
> This fails with "Statement has no result to bind(perhaps you need to
> call execute first)"
>
> This code works fine for a field that is always populated e.g. name in
> place of telephone in line 1.
If a cell is NULL, I think it is undefined in DBI
Try changing your select to
SELECT telephone from sample WHERE telephone IS NOT NULL
В списке pgsql-novice по дате отправления: