A Database Error Occurred

Error Number: 1054

Unknown column 'Array' in 'where clause'

(SELECT 'blog' as type, b.title, b.text, b.created_at as publish, m.username, m.username_p, m.is_model, CONCAT('profile/thumb_150x110/',m.pic1) as image, CONCAT(ml.url,'/',m.username_p,'/view-post/',b.permalink) as link, (b.rating_total / b.rating_count) as rating, b.rating_count, MIN(r.rating) as rating_min, MAX(r.rating) as rating_max, b.views, COUNT(f.id) as favorites FROM members_blog as b LEFT JOIN members as m ON (m.id = b.members_id) LEFT JOIN member_levels as ml ON (m.is_model = ml.value) LEFT JOIN members_ratings as r ON (b.id = r.item_id AND r.type = 3) LEFT JOIN members_favorites as f ON (b.id = f.item_id AND f.type = 5) WHERE b.id > 1 AND b.created_at < NOW() AND b.is_approved = 1 AND b.privacy = 0 AND m.is_deleted = 0 AND m.is_model = Array GROUP BY b.id ORDER BY publish DESC LIMIT 10) UNION (SELECT 'photos' as type, p.title, p.story as text, p.publish_at as publish, m.username, m.username_p, m.is_model, CONCAT('pics/',p.permalink,'/cover/thumb_150x110/',p.image) as image, CONCAT(ml.url,'/',m.username_p,'/photosets/',p.permalink) as link, (p.rating_total / p.rating_count) as rating, p.rating_count, MIN(r.rating) as rating_min, MAX(r.rating) as rating_max, p.views, COUNT(f.id) as favorites FROM members_galleries as p LEFT JOIN members as m ON (m.id = p.members_id) LEFT JOIN member_levels as ml ON (m.is_model = ml.value) LEFT JOIN members_ratings as r ON (p.id = r.item_id AND r.type = 4) LEFT JOIN members_favorites as f ON (p.id = f.item_id AND f.type = 6) WHERE p.id > 1 AND p.publish_at < NOW() AND p.is_approved = 1 AND p.privacy = 0 AND m.is_deleted = 0 AND m.is_model = Array GROUP BY p.id ORDER BY publish DESC LIMIT 10) UNION (SELECT 'videos' as type, v.title, v.story as text, v.publish_at as publish, m.username, m.username_p, m.is_model, CONCAT('vids/thumbs/',v.image) as image, CONCAT(ml.url,'/',m.username_p,'/videos/',v.permalink) as link, (v.rating_total / v.rating_count) as rating, v.rating_count, MIN(r.rating) as rating_min, MAX(r.rating) as rating_max, v.views, COUNT(f.id) as favorites FROM members_videos as v LEFT JOIN members as m ON (m.id = v.members_id) LEFT JOIN member_levels as ml ON (m.is_model = ml.value) LEFT JOIN members_ratings as r ON (v.id = r.item_id AND r.type = 5) LEFT JOIN members_favorites as f ON (v.id = f.item_id AND f.type = 4) WHERE v.id > 1 AND v.publish_at < NOW() AND v.is_approved = 1 AND v.privacy = 0 AND m.is_deleted = 0 AND m.is_model = Array GROUP BY v.id ORDER BY publish DESC LIMIT 10) UNION (SELECT 'wallpapers' as type, w.title, w.story as text, w.publish_at as publish, m.username, m.username_p, m.is_model, CONCAT('wallpapers/thumb_150x110/',w.image) as image, CONCAT(ml.url,'/',m.username_p,'/wallpapers/',w.permalink) as link, (w.rating_total / w.rating_count) as rating, w.rating_count, MIN(r.rating) as rating_min, MAX(r.rating) as rating_max, w.views, COUNT(f.id) as favorites FROM members_wallpapers as w LEFT JOIN members as m ON (m.id = w.members_id) LEFT JOIN member_levels as ml ON (m.is_model = ml.value) LEFT JOIN members_ratings as r ON (w.id = r.item_id AND r.type = 2) LEFT JOIN members_favorites as f ON (w.id = f.item_id AND f.type = 7) WHERE w.id > 1 AND w.publish_at < NOW() AND w.is_approved = 1 AND w.privacy = 0 AND m.is_deleted = 0 AND m.is_model = Array GROUP BY w.id ORDER BY publish DESC LIMIT 10) UNION (SELECT 'audio_albums' as type, b.title, b.story as text, b.publish_at as publish, m.username, m.username_p, m.is_model, CONCAT('audio/',b.id,'-',b.permalink,'/thumbs/cover/thumb_100x100/',b.image) as image, CONCAT(ml.url,'/',m.username_p,'/audio-album/',b.permalink) as link, (b.rating_total / b.rating_count) as rating, b.rating_count, MIN(r.rating) as rating_min, MAX(r.rating) as rating_max, b.views, COUNT(f.id) as favorites FROM members_audio_albums as b LEFT JOIN members as m ON (m.id = b.members_id) LEFT JOIN member_levels as ml ON (m.is_model = ml.value) LEFT JOIN members_ratings as r ON (b.id = r.item_id AND r.type = 14) LEFT JOIN members_favorites as f ON (b.id = f.item_id AND f.type = 14) WHERE b.id > 1 AND b.publish_at < NOW() AND b.is_approved = 1 AND b.privacy = 0 AND m.is_deleted = 0 AND m.is_model = Array GROUP BY b.id ORDER BY publish DESC LIMIT 10) UNION (SELECT 'events' as type, e.title, e.text as story, e.publish_at as publish, m.username, m.username_p, m.is_model, CONCAT('events/thumb_100x100/',e.image) as image, CONCAT('events/',e.permalink) as link, (e.rating_total / e.rating_count) as rating, e.rating_count, MIN(r.rating) as rating_min, MAX(r.rating) as rating_max, e.views, 0 as favorites FROM events as e LEFT JOIN members as m ON (m.id = e.members_id) LEFT JOIN members_ratings as r ON (e.id = r.item_id AND r.type = 10) WHERE e.publish_at < NOW() AND e.is_approved = 1 AND e.privacy = 0 AND m.is_deleted = 0 AND m.is_model = Array GROUP BY e.id ORDER BY publish DESC LIMIT 10) UNION (SELECT 'groups' as type, g.title, g.text, g.created_at as publish, m.username, m.username_p, m.is_model, CONCAT('groups/thumb_100x100/',g.image) as image, CONCAT('groups/',g.permalink) as link, 0 as rating, 0 as rating_count, 0 as rating_min, 0 as rating_max, 0 as views, 0 as favorites FROM groups as g LEFT JOIN members as m ON (m.id = g.members_id) WHERE g.id > 1 AND g.created_at < NOW() AND g.is_approved = 1 AND g.privacy = 0 AND m.is_deleted = 0 AND m.is_model = Array GROUP BY g.id ORDER BY publish DESC LIMIT 10) UNION (SELECT 'topics' as type, t.title, g.text, t.created_at as publish, m.username, m.username_p, m.is_model, CONCAT('groups/thumb_100x100/',g.image) as image, CONCAT('groups/',g.permalink,'/topic/',t.id) as link, (t.rating_total / t.rating_count) as rating, t.rating_count, MIN(r.rating) as rating_min, MAX(r.rating) as rating_max, 0 as views, COUNT(f.id) as favorites FROM groups_topics as t LEFT JOIN groups as g ON (g.id = t.groups_id) LEFT JOIN members as m ON (m.id = t.members_id) LEFT JOIN members_ratings as r ON (t.id = r.item_id AND r.type = 8) LEFT JOIN members_favorites as f ON (t.id = f.item_id AND f.type = 10) WHERE t.created_at < NOW() AND t.is_closed = 0 AND t.is_approved = 1 AND g.privacy = 0 AND m.is_deleted = 0 AND m.is_model = Array GROUP BY t.id ORDER BY publish DESC LIMIT 10) ORDER BY publish DESC LIMIT 10