The record in db is beginning with a comma.
The code begins with:
$imagens_nome ="";
foreach($_FILES as $file)....
Upload and create thumbnail ... Generates a new name: $ NewName
and then before writing to db:
$imagens_nome = $imagens_nome.",".$NovoNome;
However I think the above part $ images_name ... is wrong, because in db it looks like this: column photos:, 7263273813.jpg, 737862834.jpg, 236276322.jpg