|
| 1 | +const updateQuery = ` |
| 2 | + UPDATE forms |
| 3 | + LEFT JOIN bank_details ON forms.id = bank_details.form_id |
| 4 | + LEFT JOIN files ON forms.id = files.form_id |
| 5 | + LEFT JOIN users ON forms.user_id = users.id |
| 6 | + LEFT JOIN form_lands ON forms.id = form_lands.form_id |
| 7 | + SET |
| 8 | + forms.form_type = ?, |
| 9 | + forms.farmer_name = ?, |
| 10 | + forms.age = ?, |
| 11 | + forms.mobile = ?, |
| 12 | + forms.district = ?, |
| 13 | + forms.block = ?, |
| 14 | + forms.panchayat = ?, |
| 15 | + forms.hamlet = ?, |
| 16 | + forms.id_type = ?, |
| 17 | + forms.id_number = ?, |
| 18 | + forms.gender = ?, |
| 19 | + forms.spouse = ?, |
| 20 | + forms.type_of_households = ?, |
| 21 | + forms.h_members = ?, |
| 22 | + forms.hh_occupation = ?, |
| 23 | + forms.special_catog = ?, |
| 24 | + forms.caste = ?, |
| 25 | + forms.house_owner = ?, |
| 26 | + forms.type_of_house = ?, |
| 27 | + forms.drinking_water = ?, |
| 28 | + forms.potability = ?, |
| 29 | + forms.domestic_water = ?, |
| 30 | + forms.toilet_avail = ?, |
| 31 | + forms.toilet_cond = ?, |
| 32 | + forms.household_education = ?, |
| 33 | + forms.user_id = ?, |
| 34 | + forms.created_at = ?, |
| 35 | + forms.lat = ?, |
| 36 | + forms.lon = ?, |
| 37 | + forms.mcode = ?, |
| 38 | + forms.status = ?, |
| 39 | + forms.remarks = ?, |
| 40 | +
|
| 41 | + bank_details.account_holder_name = ?, |
| 42 | + bank_details.account_number = ?, |
| 43 | + bank_details.bank_name = ?, |
| 44 | + bank_details.branch = ?, |
| 45 | + bank_details.ifsc_code = ?, |
| 46 | + bank_details.farmer_ack = ?, |
| 47 | +
|
| 48 | + files.identity = ?, |
| 49 | + files.geotag = ?, |
| 50 | + files.patta = ?, |
| 51 | + files.fmb = ?, |
| 52 | + files.photo = ?, |
| 53 | + files.passbook = ?, |
| 54 | + files.passbook_postfunding = ?, |
| 55 | + files.payment_voucher = ?, |
| 56 | +
|
| 57 | + form_lands.ownership = ?, |
| 58 | + form_lands.well_irrigation = ?, |
| 59 | + form_lands.area_irrigated = ?, |
| 60 | + form_lands.irrigated_lands = ?, |
| 61 | + form_lands.patta = ?, |
| 62 | + form_lands.total_area = ?, |
| 63 | + form_lands.taluk = ?, |
| 64 | + form_lands.firka = ?, |
| 65 | + form_lands.revenue = ?, |
| 66 | + form_lands.crop_season = ?, |
| 67 | + form_lands.livestocks = ?, |
| 68 | + form_lands.sf_number = ?, |
| 69 | + form_lands.soil_type = ?, |
| 70 | + form_lands.land_to_benefit = ?, |
| 71 | + form_lands.date_of_ins = ?, |
| 72 | + form_lands.area_benefited = ?, |
| 73 | + form_lands.type_of_work = ?, |
| 74 | + form_lands.any_other_works = ?, |
| 75 | + form_lands.p_contribution = ?, |
| 76 | + form_lands.f_contribution = ?, |
| 77 | + form_lands.total_est = ?, |
| 78 | + form_lands.field_insp = ?, |
| 79 | + form_lands.site_app = ?, |
| 80 | + form_lands.date_of_app = ?, |
| 81 | + form_lands.area_benefited_postfunding = ?, |
| 82 | + form_lands.verified_by = ?, |
| 83 | +
|
| 84 | + users.name = ?, |
| 85 | + users.email = ?, |
| 86 | + users.password = ?, |
| 87 | + users.role = ?, |
| 88 | + users.mobile = ?, |
| 89 | + users.date_of_joining = ?, |
| 90 | + users.location = ?, |
| 91 | + users.created_at = ?, |
| 92 | + users.photo = ? |
| 93 | +
|
| 94 | + WHERE |
| 95 | + forms.form_type = 1 |
| 96 | + AND forms.id = ?; |
| 97 | +`; |
0 commit comments