summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSashi202019-09-23 19:22:30 +0530
committerSashi202019-09-23 19:22:30 +0530
commit6385da42e8310ebc5b3fe0b44fecf31c344e676d (patch)
tree9663f3428313a1ade84bc44ddcec0d62fbde4dd4
parent6de418022dc45f0695723b07b4fb5f4321d8d616 (diff)
downloadDWSIM_lab_migration_module-6385da42e8310ebc5b3fe0b44fecf31c344e676d.tar.gz
DWSIM_lab_migration_module-6385da42e8310ebc5b3fe0b44fecf31c344e676d.tar.bz2
DWSIM_lab_migration_module-6385da42e8310ebc5b3fe0b44fecf31c344e676d.zip
Modiy database queries to download files
-rwxr-xr-xfull_download.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/full_download.inc b/full_download.inc
index bda993d..e108d60 100755
--- a/full_download.inc
+++ b/full_download.inc
@@ -116,7 +116,7 @@ function lab_migration_download_full_lab()
while ($solution_row = $solution_q->fetchObject())
{
$CODE_PATH = 'CODE' . $solution_row->code_number . '/';
- $solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM lab_migration_solution_files lmsf JOIN lab_migration_solution lms JOIN lab_migration_experiment lme JOIN lab_migration_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.id = :solution_id", array(':solution_id' => $solution_row->id));
+ $solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM lab_migration_solution_files lmsf JOIN lab_migration_solution lms JOIN lab_migration_experiment lme JOIN lab_migration_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.solution_id = :solution_id", array(':solution_id' => $solution_row->id));
while ($solution_files_row = $solution_files_q->fetchObject())
{
$zip->addFile($root_path .$solution_files_row->directory_name . '/' . $solution_files_row->filepath, $LAB_PATH . $PENDING_PATH . $EXP_PATH . $CODE_PATH . $solution_files_row->filename);