Having the following tables
tasks
id
title
tasks_cstm
id
task_id
contact_number
tasks_issues
id
task_id
issue_id
issues
id
name
issues_cstm
id
id_issue
frequency
validity
I try to make an update query. This query requires to modify a field of a table based on a condition in which I must implement joins between three tables. I explain below.
I need to update the frequency field of the table issues_cstm to value '1500', this, where the field 'contact_number' of the table 'tasks_cstm' is equal to '456123'
I am trying this query but with no success
update
issues_cstm
inner join
tasks_issues on issues_cstm.issue_id = tasks_issues.issue_id
inner join
tasks_cstm on tasks_cstm.task_id = tasks_issues.task_id
set
issues_cstm.contact_number = '1500'
where
tasks_cstm.contact_number = '456123';
I attach a sqlfiddle
I have no previous experience with update queries of this type. I appreciate your advice.