knex update and list all record mysql
const data = await db('user')
.where('userId', '818f68e5-bf7f-418c-8e8e-19f3b25cb9c3')
.update({ about: 'Alice in Wonderland' }, '*', { includeTriggerModifications: true })
knex update and list all record mysql
const data = await db('user')
.where('userId', '818f68e5-bf7f-418c-8e8e-19f3b25cb9c3')
.update({ about: 'Alice in Wonderland' }, '*', { includeTriggerModifications: true })
resullt all update knex mysql
const {id,name} = req.body;
const subQuery = knex('client').select('id').where({id})
subQuery.then(response=>{
if(response.length>0){
subQuery.update({name})
.then(resp=>{
res.json('update done')
})
.catch(err=>{res.json(err)})
}
else{
res.json('update failed')
}
})
.catch(err=>{res.json(err)})
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us