There must be a better way of doing this?sub find_avaliable { # Create the SQL statement $sth = $dbh->prepare( "select CODE from INV where CODE = $user_inp +ut"); # Execute the SQL statement and generate a result set $sth->execute(); #Get results and process ($CODE) = $sth->fetchrow_array; if ($CODE ne "") { $user_input+=1; &find_avaliable; } else { #$COUT->Write("$user_input"); return; } }
In reply to Finding the next avaliable id in a SQLite database by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |