|
@@ -108,27 +108,16 @@ client.findById=async function(cid,attributes){
|
|
|
var staffDetail=[];
|
|
|
|
|
|
var sqlQuery = 'SELECT b.* FROM CLD_client_staff as a left join CLD_staff as b on (a.sid=b.sid) where a.cid=?';
|
|
|
-
|
|
|
- sequelize.query(sqlQuery,
|
|
|
+ await this.sequelize.query(sqlQuery,
|
|
|
{ replacements: [cid], type: sequelize.QueryTypes.SELECT }
|
|
|
).then(function(projects) {
|
|
|
console.log(projects[0])
|
|
|
})
|
|
|
|
|
|
-// await this.sequelize.query(sqlQuery,
|
|
|
-// type: sequelize.QueryTypes.SELECT,
|
|
|
-// bind: {
|
|
|
-// cid: cid
|
|
|
-// }
|
|
|
-// ).spread((results, metadata) => {
|
|
|
-// staffDetail=results[0];
|
|
|
-// });
|
|
|
-
|
|
|
|
|
|
|
|
|
await this.sequelize.query('SELECT b.* FROM CLD_client_staff as a left join CLD_staff as b on (a.sid=b.sid) where a.cid=7').spread((results, metadata) => {
|
|
|
staffDetail=results[0];
|
|
|
- console.log(staffDetail)
|
|
|
});
|
|
|
|
|
|
|