bool pq\Result::fetchCol(mixed &$ref[, mixed $col = 0])

Iteratively fetch a single column.

Params:

Returns:

Throws:

Example:


<?php

try {
    
$connection = new pq\Connection;
    
    
$result $connection->exec("SELECT email FROM accounts WHERE email LIKE '_@%'");
    
    while (
$result->fetchCol($email))  {
        echo 
"Mail: {$email}\n";
    }
} catch (
\pq\Exception $e) {
    echo 
$e->getMessage(), "\n";
}

?>