Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

240
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda