php - Display multiple rows as one in MySQL -
I want some advice
I have created a web app where a user can assign multiple forms The recipients simultaneously insert multiple rows (one line per recipient) in a work Therefore, an assignment can generate these 100 rows (for 100 recipients), for example, and each recipient of "complete" Can edit your personal line in the form it is now Far better. The problem is, if I want to generate a list of assignments for that user, then I should see only one row for the multi-user assignment (not one line I like to be able to show a table to the user: You have been assigned: Form 1: 50 Users Reason: April 25, 2014 User Full: 10 See User List < / Em> and assign each group to one The account will appear: User 1 has given you the following form: Due to Form 1: April 25, 2014, click to mark as complete < p> I do not know about this, how to know about it, if someone can point me in the right direction, then I appreciate it. If I understand you correctly, you want to present the assigning person For the result of each assignment / date grouped by a list of assignments, assignment and date, you also want to show how many users have already completed the assignment rights. So you want to select from the assignment and your result will be Now you want < Code> JOIN How many students have already ended this assignment to find out the given task. This is the reason why I added the nickname 'Group Assetment' to join a You can add a calculation to: Obviously I did not do this test and it will not work for you, but it should take you in the right direction. Read more on form_assignments such that the table is like so:
foreach (as the $ line $ Recipients) {$ query = "insert in form_assignments (SENDER_ID, recipient_id, form_id, DUE_DATE, priority_id, comment, completion) values ('{ $ {SENDER_ID} ','. $ Line ['id']. ", '{$ Assign_form_id}', '2014 -04-30 00:00:00', '{$ priority_ID}', '{$ comment}' In the above example,
$ recipient is an array containing
sender_id ,
form_id and
DUE_DATE first:
select SENDER_ID, form_id, GroupedAssignments group groupedAssignments.sender_id, groupedAssignments.form_id, groupedAssignments.due_date from task as
join since your
as the finishedAssignments function JOIN (groupedAssignments.sender_id = finishedAssignments.sender_id and groupedAssignments.form_id = finishedAssignments .form_id and groupedAssignments.due_date = finishedAssignments.due_date and finishedAssignments.completed = TRUE)
Select group group as swagames.adder_id, groupedsignments.form_id, group Assessment. Add assignments as tasks completed in the form of groups that were grouped in the form of data (COUNT), finished as Assassinated (Sponsored Assignment), (Grouped Permissions.ender_id = Expirations.Company_ID and Grouped Assignments.form_id = finishedAssignments. Form_id and grouped assignment.data_data = expired asset.data and endassment.plotted = TRUE) Assignments finished by group. Sheanda_ID, Finnish Assetments.form_id, FinishesSig Nments.due_date
Comments
Post a Comment