WordPress database error: [Lost connection to MySQL server during query]
SELECT film.*, pm2.meta_value as role, pm3.meta_value as textual_role FROM wp_posts film INNER JOIN wp_postmeta pm ON pm.post_ID=film.ID AND pm.meta_key LIKE 'roles_%_role_id' AND film.post_type='film' AND film.post_status='publish' LEFT JOIN wp_postmeta pm2 ON pm2.post_ID=pm.post_ID AND pm2.meta_key=CONCAT( 'roles_' , REPLACE(REPLACE(pm.meta_key, 'roles_', ''),'_role_id','') , '_role_choice' ) LEFT JOIN wp_postmeta pm3 ON pm3.post_ID=pm.post_ID AND pm3.meta_key=CONCAT( 'roles_' , REPLACE(REPLACE(pm.meta_key, 'roles_', ''),'_role_id','') , '_role' ) WHERE pm.meta_value=11716 ORDER BY film.post_title

Anat Salomon