|
@@ -12,15 +12,16 @@ if ($conn === false) {
|
|
|
die(print_r(sqlsrv_errors(), true));
|
|
die(print_r(sqlsrv_errors(), true));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-$sql = "SELECT [Import_Log].[UserID],[DepartmentName],[Import_Log].[project_id],[project_name],[upload_time] FROM [21000X].[dbo].[Import_Log]
|
|
|
|
|
-JOIN [permissions].[dbo].[user] ON [user].[UserID] = [Import_Log].[UserID]
|
|
|
|
|
-JOIN [Project_Table] ON [Project_Table].[project_id] = [Import_Log].[project_id]
|
|
|
|
|
|
|
+$sql = "SELECT [Import_Log].[UserID],[UserName],[DepartmentName],[Import_Log].[project_id],[project_name],[upload_time] FROM [21000X].[dbo].[Import_Log]
|
|
|
|
|
+JOIN [dbo].[user] ON [user].[UserID] = [21000X].[dbo].[Import_Log].[UserID]
|
|
|
|
|
+JOIN [21000X].[dbo].[Project_Table] ON [Project_Table].[project_id] = [Import_Log].[project_id]
|
|
|
JOIN [permissions].[dbo].[Department] ON [user].[DepartmentID] = [Department].[DepartmentID]";
|
|
JOIN [permissions].[dbo].[Department] ON [user].[DepartmentID] = [Department].[DepartmentID]";
|
|
|
$stmt = sqlsrv_query($conn, $sql);
|
|
$stmt = sqlsrv_query($conn, $sql);
|
|
|
while ($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
|
|
while ($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
|
|
|
|
|
|
|
|
$temp = array();
|
|
$temp = array();
|
|
|
$temp["UserID"] = $row["UserID"];
|
|
$temp["UserID"] = $row["UserID"];
|
|
|
|
|
+ $temp["UserName"] = $row["UserName"];
|
|
|
$temp["DepartmentName"] = $row["DepartmentName"];
|
|
$temp["DepartmentName"] = $row["DepartmentName"];
|
|
|
$temp["project_id"] = $row["project_id"];
|
|
$temp["project_id"] = $row["project_id"];
|
|
|
$temp["project_name"] = $row["project_name"];
|
|
$temp["project_name"] = $row["project_name"];
|