Your code looks o.k. I can tell you, though, that if the file is not being uploaded, it will not get the file name into the database so we need to figure out the first part which is why the file is not actually getting uploaded.
My first question whenever I see this problem is have you checked the permissions of the upload folder on the server. If the folder has not had the correct CHMOD command applied, it will not work. Most servers require this to be 0777 but some prefer 0755.
Best regards,
Brian