they are being created by mysql.
I am running a query as below and it works OK.
It seems that mysql is making the temp file and, as I found out this morning, they don't seem to be being deleted when they are no longer required (as I thought they should be).
Maybe I need to make a mysql setup change (from its default)?
BTW, the only reason I think it is a temp file issue is that the error was coming from the 'execute' line. Other than that, I would have thought it was the session file that was doing it. Now, as a secondary issue, sessions are terminated when the browser is closed. But they too are not yet being deleted from the server. What is the simplest way to prevent session files from filling up the temp dir? cron job or a small function in each script of my master login? (Never done a cron before).
my $sth = $connect->prepare ("select
from file_data AS fd
join file_sequencing AS fs
on fs.file_id = fd.file_id
join file_images AS fi
on fi.id = fd.id
where fs.business_id = ?
and fd.file_name_other_language = ?
and fd.language_abbr_this_file = ?
and fs.live_from = ( select max(b.live_from)
from file_sequencing as b
where b.business_id = fs.business_id
and b.live_from <= curdate()
and b.file_name_in_home_language = fs.file_name_in_home_language
and ( ( fs.live_to = '0000-00-00')
(fs.live_to > curdate() )
order by fd.text_block_sequence asc
") or die "prepare statement failed: $DBI::errstr\n";
$sth->execute( $business_id, $subject, $chosen_language ) or die "execute statement failed: $DBI::errstr\n";