Help for this page

Select Code to Download


  1. or download this
    -- fetch 10 to avoid querying too many times....
    SELECT * FROM tablex ORDER BY dateofinsertion LIMIT 10;
    -- Mark the register as owned by you
    UPDATE tablex SET controlfield=controlfield+1 WHERE id=$id AND control
    +field=$controlfieldvalue;
    
  2. or download this
    if ($sth->rows) {
        # it did the update, so the row is mine.
    } else {
        # someone else took the register, let's try another one
    }