On Thursday 22 September 2005 20:03, Dmitri Bichko wrote:
> SELECT * FROM principals WHERE event = 15821 AND person != 2?
Sure, that's a concise answer to what I actually wrote, but it wasn't
exactly what I intended :)
Basically, what I've got is the first person and the tag_type. I can do
it with a function from PHP:
function get_spouses($p) { $handle = pg_query("select person from principals where event in
(selectevent from principals where person = $p and tag_type = " .MARR. ")
orderby sort_date"); $i=0; $spouses = array(); while ($row = pg_fetch_row($handle) { if $row[0] != $p
$spouses[$i++] = $row[0]; } return $spouses;
}
But this is *ugly* ...
--
Leif Biberg Kristensen
http://solumslekt.org/