List:General Discussion« Previous MessageNext Message »
From:Kory Wheatley Date:December 15 2006 12:38am
Subject:Start at a number to find next available number
View as plain text  
I have this perl mysql statement below that finds the next available number that's not in
two table, and it works find.  But  what if I wanted to find the next available number
starting at 100 or 1000, how would I introduce that in this code?

  my $sth = $dbh->prepare( "SELECT MIN(allnum) FROM (ReferenceNum LEFT JOIN UidNumber
ON allnum = uid) left join GidNumber on allnum = gid WHERE uid is NULL and gid IS NULL" );

Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
Start at a number to find next available numberKory Wheatley15 Dec