in reply to UPDATE WHERE oid = $oid

This is a terrible hack way to do it - but you could reduce it to one select by:
$sql='select oid,time'; $sql.='from clock'; $sql.='order by time'; $exec=$dbh->prepare($sql); $exec=$dbh->execute()||die "Query Failed\n$sql\nError:\n$DBI::errstr"; while ($res=$exec->fetch) { $latest_oid=${$res}[0]; }
As the last record to come off this query should be the one with the latest time stamp - $latest_oid will have the corresponding oid.
game(Wookie,opponent) eq 'Wookie' ? undef $problem : remove_limbs(arms,opponent);

Replies are listed 'Best First'.
Re: Re: UPDATE WHERE oid = $oid
by runrig (Abbot) on Jul 20, 2001 at 01:26 UTC
    You can order by 'time desc' and then the first oid's will be the ones with the latest timestamp.