Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
How to apply like when selecting row based on column which is not present in another table (Mysql Nodejs)

Hi Developers! I need your help

What I am doing right now is selecting only those rows based on column values that are not present in another table

Now what I want is after selecting those rows I want to apply like operator on them

My nameFilter

let nameFilter = "";
if (filters.search) {
        nameFilter = `AND wci.nfc_uid LIKE '%${nameFilter}%'`;
    }

MY Query

mysqlResult = await db.query(`SELECT * FROM wallet_card_inventory as wci WHERE NOT EXISTS 
    (SELECT cuw.nfc_uid FROM commuter_users_wallet as cuw WHERE wci.nfc_uid = cuw.nfc_uid) ${nameFilter} LIMIT ?,?`, [((page - 1) * perPage), perPage]);

Query works fine but it don't filter when I want to search something from Frontend

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!