0) { while($stubcount = mysql_fetch_row($stubquery)) { $count = $stubcount[0]; if ($count > 0) { $stub .= "-$count"; $count++; } } } $stub_f = mysql_real_escape_string($stub); $upquery = "UPDATE Photos SET Stub = '$stub_f' WHERE PhotoID = $photoID"; if (!$update = @ mysql_query ($upquery, $connection)) print "Error " . mysql_errno() . " : " . mysql_error(); print "The new URL for photo $photoID will be /$stub
"; } } ?>