SELECT ID as itpost, postImportedID(ID) AS pii, post_type as pot, ( SELECT ID from `cmcorgws01_posts` WHERE postImportedID(ID) = pii AND postImportedLang(ID) = BINARY 'CS' AND post_type = pot and post_status in ('draft', 'publish') LIMIT 0, 1) as csid from `cmcorgws01_posts` where postImportedLang(ID) = BINARY 'IT' AND post_type in ('event', 'news', 'mtm', 'project', 'gallery') and post_status in ('draft', 'publish') and postImportedID(ID) <> BINARY '' LIMIT 0, 10;

Errore sul database di WordPress: [FUNCTION camic_evdb.postImportedID does not exist]
SELECT ID as itpost, postImportedID(ID) AS pii, post_type as pot, ( SELECT ID from `cmcorgws01_posts` WHERE postImportedID(ID) = pii AND postImportedLang(ID) = BINARY 'CS' AND post_type = pot and post_status in ('draft', 'publish') LIMIT 0, 1) as csid from `cmcorgws01_posts` where postImportedLang(ID) = BINARY 'IT' AND post_type in ('event', 'news', 'mtm', 'project', 'gallery') and post_status in ('draft', 'publish') and postImportedID(ID) <> BINARY '' LIMIT 0, 10;