Skip to content

Commit 08a9459

Browse files
committed
postfunding_update_query.sql
1 parent eb20e4d commit 08a9459

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
//form_lands
2+
3+
4+
5+
const updateQuery = `
6+
UPDATE form_lands
7+
LEFT JOIN forms ON form_lands.form_id = forms.id
8+
LEFT JOIN files ON forms.id = files.form_id
9+
SET
10+
form_lands.p_contribution = ?,
11+
form_lands.f_contribution = ?,
12+
form_lands.total_est = ?,
13+
form_lands.measured_by = ?,
14+
form_lands.total_area = ?,
15+
files.passbook_postfunding = ?
16+
WHERE
17+
form_lands.form_id = ?
18+
AND forms.form_type = 1
19+
`;
20+
21+
//farm_pond_details
22+
23+
const updateQuery = `
24+
UPDATE farm_pond_details
25+
LEFT JOIN forms ON farm_pond_details.form_id = forms.id
26+
LEFT JOIN files ON forms.id = files.form_id
27+
SET
28+
farm_pond_details.p_contribution = ?,
29+
farm_pond_details.f_contribution = ?,
30+
farm_pond_details.total_est = ?,
31+
farm_pond_details.measured_by = ?,
32+
farm_pond_details.len_pf = ?,
33+
farm_pond_details.bre_pf = ?,
34+
farm_pond_details.dep_pf = ?,
35+
farm_pond_details.vol_pf = ?,
36+
files.passbook_postfunding = ?
37+
WHERE
38+
farm_pond_details.form_id = ?
39+
AND forms.form_type = 2
40+
`;
41+
42+
43+
//plantation_form
44+
45+
46+
const updateQuery = `
47+
UPDATE plantation_details
48+
LEFT JOIN forms ON plantation_details.form_id = forms.id
49+
LEFT JOIN files ON forms.id = files.form_id
50+
SET
51+
plantation_details.p_contribution = ?,
52+
plantation_details.f_contribution = ?,
53+
plantation_details.total_est = ?,
54+
plantation_details.plantaions = ?,
55+
plantation_details.nos = ?,
56+
plantation_details.price = ?,
57+
plantation_details.other_exp = ?,
58+
plantation_details.tot_nos = ?,
59+
plantation_details.tot_price = ?,
60+
plantation_details.measured_by = ?,
61+
plantation_details.total_area = ?,
62+
files.passbook_postfunding = ?
63+
WHERE
64+
plantation_details.form_id = ?
65+
AND forms.form_type = 3
66+
`;

0 commit comments

Comments
 (0)