I have two specific tables that I am working from
select event.`id`,
`studentid`,
`staffid`,
`title`,
`staff_reason`,
`staff_action`,
`description`,
`time_lodged`,
`followup`,
concat(firstname," ",surname
`coordinator`,
`admin_action`,
`yearlev`,
progress
`progressid`,
`time_updated`
From `event`
inner join staff on event.staffid=staff.idstaff
inner join progress on event.progressid=progress.idprogress
and staff with
idstaff,
surname,
firstname,
user logs on with sessionid[userid]
In the first table when the event is added (and no coordinator selected) it fills the name of the staff id in there (but doesn't add to the table) and also the name of the same person in staffid (this one is fine as well as db entry).
Even when the event is updated it returns the original staff members name althouhg in the db the coordinator has a different id. Both draw their names from the same table but have different ids.
Is there any way of having them return different names even though they are from the same table using the concat function?
Have tried leaving the staff member off but when I change the innerjoin to event.coordinator the event is lost from the staff members screen as it is set for users can only see their own events here.
Cheers