Citation :
function Insert_data($name,$temp,$size)
{
if ($f = fopen( $temp, "r" )) {
$data = fread($f, $size);
$data = addslashes($data);
$date = date("YmdHis" );
require ('config.php');//the config file
$sql = "INSERT INTO ".$table_prefix."file (file_id ,file_name ,file_size ,file_data ,file_date ,file_comment ,file_container ,file_user) VALUES ('','".$name."','".$size."','".$data."','".$date."','".$this->comment."','".$this->container."','".$_SESSION['login']['id']."')"; $query = NEW Query();
$query->Sql($sql) or die ('erreur d\' execution de la requète<br>');
return 1;
}
else
{
return 0; }
}
|