DELETE wp_mailpoet_subscriber_segment AS msubseg
WHERE msubseg.subscriber_id = (
SELECT msub.id
FROM wp_mailpoet_subscribers AS msub
WHERE msub.link_token = '66301e'
)
AND msubseg.segment_id = 1
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AS msubseg
WHERE msubseg.subscriber_id = (
SELECT msub.id
FROM' at line 1
DELETE FROM wp_mailpoet_subscriber_segment
FROM wp_mailpoet_subscriber_segment
INNER JOIN wp_mailpoet_subscribers
ON wp_mailpoet_subscribers.id = wp_mailpoet_subscriber_segment.subscriber_id
WHERE wp_mailpoet_subscribers.link_token = '66301e'
AND wp_mailpoet_subscriber_segment.segment_id = 1