You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var query = {
text: 'SELECT * FROM advertisement WHERE (brand_class = ($1) AND product_class = ($2)) ',
values: [brand_class,product_class]
};
const client = await pool.connect();
const res = await client.query(query);
I does not work with pg, but it works by directly querying postgresql.:
SELECT * FROM advertisement WHERE (brand_class ='body_cosmetic' AND product_class ='skin_tone');
This one works:
var query = {
text: 'SELECT * FROM advertisement WHERE product_class =($1)',
values: product_class
};
But AND or other operator is not well handled by pg....