I am getting an integer value error but don’t understand why.
Warning: #1292 Truncated incorrect INTEGER value: ‘%accepted%’;
Warning: #1292 Truncated incorrect INTEGER value: ‘%pending%’ .
It does not have the error for processing. It doesnt matter what is in “1st position” doesnt have the error.
Could someone please help?
SELECT a.`post_id`, b.`name`, MAX(case when meta_key = 'value' THEN `meta_value` ELSE NULL END) as 'Email', FROM table_1 a INNER JOIN table_2 b ON FIND_IN_SET(a.post_id, b.payment_ids) GROUP BY a.post_id HAVING OrderStatus LIKE '%processing%' OR '%pending%' OR '%accepted%' AND DeliveryDate >= (DATE_SUB(CURDATE(), INTERVAL 7 DAY)) AND DeliveryType = 'pickup'
Advertisement
Answer
SELECT a.`post_id`, b.`name`, MAX(case when meta_key = 'value' THEN `meta_value` ELSE NULL END) as 'Email', FROM table_1 a INNER JOIN table_2 b ON FIND_IN_SET(a.post_id, b.payment_ids) GROUP BY a.post_id HAVING OrderStatus LIKE '%processing%' OR OrderStatus LIKE '%pending%' OR OrderStatus LIKE '%accepted%' AND DeliveryDate >= (DATE_SUB(CURDATE(), INTERVAL 7 DAY)) AND DeliveryType = 'pickup'