Ciao a tutti, ho un problema con l' inserimento di un file nel DB.

Codice PHP:
$fileName $_FILES['userfile']['name'];
$tmpName  $_FILES['userfile']['tmp_name'];
$fileSize $_FILES['userfile']['size'];
$fileType $_FILES['userfile']['type'];
$fp fopen($tmpName'r');
$content fread($fpfilesize($tmpName));
$content addslashes($content);fclose($fp);
if(!
get_magic_quotes_gpc())
{    
   
$fileName addslashes($fileName);
}

$sql "UPDATE t_summary_of_work 
           SET subject = '"
.$_POST["sow_subject"]."',                 
                 with_iva = "
.$_POST["with_iva"].",                 
                 cost_sow = "
.$_POST["num_sow"].",                     
                 note = '"
.$_POST["note_sow"]."',
                 id_summary_of_work_status = "
.$_POST["sow_status"].",                
                 data_file = "
.$content."                 
WHERE id_summary_of_work = "
.$_POST["id_sow"];       

if(
$link->query($sql))
{
header("Location: home_sow.php?sez=sow_update&id=".$_POST["id_sow"]."&msg=notice&code=3");        
}
else{print 
"Errore durante l' inserimento dei dati.";} 
Mi da errore nella query...grazie