Added serial into the SQL SELECT query for the function that gets the current serial number and increases it. -Bergur