I have a PHP script to upload files.
Each uploaded file
name,
size and
type are stored in mysql table. I have a table called files_temp (temporary table for uploaded files).
The mySQL table:
I don't store the files as BLOB, i store only the details in mySQL table. I have a separate directory on Web server to store each uploaded file.
I want to check the total size for each uploaded file. PHP need to tell the web browser, hey your files are bigger than 10MB.
I know exist a way to do this using SUM in mySQL but I don't know what I need to do to get the last files uploaded from user.
mysql_insert_id not return more than last row. If more files uploaded more rows created.
Exist a way to check the files size after upload? I don't want to do this only with mySQL, I wait any idea or better suggestions.
Thanks!