Incremental
Member
Hi,
When clicking Edit in a Contact list row, it opens a Form. In the onBeforeLoad() PHP code of the form, I'd like to perform an update with a joined table : Status table (contactsstatus) like this :
ID Status
1 New
2 Read
3 Closed
I want to update the Status field in Contact table (contacts) with the contactsstatus ID corresponding to Status = "Read"
I tried :
but the code execution is stucked.
What could be the correct syntax ?
Thanks by advance
When clicking Edit in a Contact list row, it opens a Form. In the onBeforeLoad() PHP code of the form, I'd like to perform an update with a joined table : Status table (contactsstatus) like this :
ID Status
1 New
2 Read
3 Closed
I want to update the Status field in Contact table (contacts) with the contactsstatus ID corresponding to Status = "Read"
I tried :
PHP:
$query
-> update('contacts AS c')
-> join('INNER','contactsstatus AS s ON s.Status = Read')
-> set('c.Status = s.id')
-> where(c.id = '. $IDinput);
What could be the correct syntax ?
Thanks by advance