Retrieves the fid of the last inserted file.
File
- drupal/modules/file/tests/file.test, line 45
- Tests for file.module.
Class
- FileFieldTestCase
- Provides methods specifically for testing File module's field handling.
Code
function getLastFileId() {
return (int) db_query('SELECT MAX(fid) FROM {file_managed}')
->fetchField();
}