Hi,
I have created a table view with the following sql
select event.`id`,
concat(fn," ",sn)
`studentid`,
`yearlev`,
concat(staff.firstname," ",staff.surname)
`staffid`,
`title`,
reason
`Type_of_Behaviour`,
staffaction
`staff_action`,
`description`,
`time_lodged`,
`followup`,
concat(vhstaff.firstname," ",vhstaff.surname)
`coordinator`,
`progressid`,
`student`.`form group`AS`form`,
`student`.`Postal Name`,
`student`.`Street Address`,
`student`.`Suburb`,
`student`.`postcode`,
`admin_action`,
`time_updated`
From `event`
inner join reasons on event.Type_of_Behaviour=reasons.idreasons
inner join staffaction on event.staff_action=staffaction.idstaction
inner join staff on event.staffid=staff.username
inner join student on event.studentid=student.code
inner join vhstaff on event.coordinator=vhstaff.username
And the view part works well as does list.
When I try to edit the event the following is seen
"Unknown column 'student.form group' in 'where clause'"
which I presume comes from `student`.`form group`AS`form`, which is just a place holder from another table. I am also using this an ownership field which controls access by comparing with another table value.
Is there a way to fix this?