Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const mapBarCodes = (variantId) => {
- return new Promise((resolve, reject) => {
- connection_scale.query(
- "SELECT Shopify_variant_products.Barcode, varianti.cdar from Shopify_variant_products \
- INNER JOIN varianti ON Shopify_variant_products.Barcode = varianti.barcode \
- WHERE VariantId = ?",
- [variantId],
- (err, res, fields) => {
- err
- ? reject(err)
- : resolve(err)
- }
- );
- });
- };
- mapBarCodes('37723929903266')
- .then((result) => {
- console.log(result);
- })
- .catch((error) => {
- console.log(error);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement