Answer the question
In order to leave comments, you need to log in
How to make a query to the database and display certain columns?
The situation is this. The database has a column with IDs. That is, there may be one number, for example 5, or there may be two, for example 4.5
How to make it so that when querying the database and searching for the value 5, it also catches the column in which there are several numbers.
otd.findAll({where:{
Id:request.body.data},
raw: true
}).then(otd=>{
if(!otd.length){
response.json(nonOtd);
return console.log(nonOtd);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question