More sweeps to replace select * with actual returned column names dramatically reduces php memory usage and speeds up processing dramatically especially in the crons since they run all the time

This commit is contained in:
johnnyq
2026-08-06 13:10:23 -04:00
parent b8c9d5b4cf
commit b3744e9ed5
247 changed files with 816 additions and 457 deletions

View File

@@ -17,7 +17,9 @@ if (isset($_GET['document_id'])) {
$folder_location = 0;
$sql_document = mysqli_query($mysqli, "SELECT * FROM documents
$sql_document = mysqli_query($mysqli, "SELECT document_archived_at, document_client_visible, document_content, document_created_at,
document_created_by, document_description, document_folder_id, document_name,
document_updated_at, folder_name, user_name FROM documents
LEFT JOIN folders ON document_folder_id = folder_id
LEFT JOIN users ON document_created_by = user_id
WHERE document_client_id = $client_id AND document_id = $document_id
@@ -209,7 +211,7 @@ $page_title = $row['document_name'];
</button>
</h6>
<?php
$sql_files = mysqli_query($mysqli, "SELECT * FROM files, document_files
$sql_files = mysqli_query($mysqli, "SELECT file_folder_id, files.file_id, file_name FROM files, document_files
WHERE document_files.file_id = files.file_id
AND document_files.document_id = $document_id
ORDER BY file_name ASC"