SQL Error: Unknown column 'r.pid' in 'on clause' at /var/www/svem/data/www/svem.ru/lib/Questions/Query.php line 860
					SELECT
						 q.questionsId
						,q.title
						,q.text
						,q.name
						,q.email
						,UNIX_TIMESTAMP(q.date) as date
						,q.rubric_id
						,r.name as rubric_name
						,r.url as rubric_url
						,pr.rubric_id as parent_rubric_id
						,pr.url as parent_rubric_url
						,pr.name as parent_rubric_name
						,lc.name as city
						,lr.name as region
						,lco.name as country
						,(SELECT GROUP_CONCAT(l.label_id,';',name ORDER BY name SEPARATOR ', ') FROM label l, label_questions lq WHERE l.label_id = lq.label_id AND lq.questionsId = q.questionsId) labels
						,(SELECT count(*) FROM answers AS a WHERE a.questionsId = q.questionsId) cor
-- -qvc-                   ,qvc.count AS voice_count
                        ,(SELECT mark FROM question_voice_ip AS qvi WHERE qvi.question_id = q.questionsId AND qvi.ip = 919441462) AS voice_mark
                        , IF (qd.question_id, 1, 0) AS deleted
                        , qp.phone
					FROM questions AS q
					LEFT JOIN question_loc1_city AS qlc ON (qlc.question_id = q.questionsId) LEFT JOIN loc1_city AS lc ON (lc.city_id = qlc.city_id)
					LEFT JOIN question_loc1_region AS qlr ON (qlr.question_id = q.questionsId) LEFT JOIN loc1_region AS lr ON (lr.region_id = qlr.region_id)
					LEFT JOIN question_loc1_country AS qlco ON (qlco.question_id = q.questionsId) LEFT JOIN loc1_country AS lco ON (lco.country_id = qlco.country_id)
					LEFT JOIN rubric AS pr ON (r.pid = pr.rubric_id)
-- -qvc-				LEFT JOIN question_voice_count AS qvc ON (qvc.question_id = q.questionsId)
					LEFT JOIN question_deleted AS qd ON (qd.question_id = q.questionsId)
					LEFT JOIN question_phone AS qp ON (qp.question_id = q.questionsId)
					LEFT JOIN question_rubric AS qr ON (qr.question_id = q.questionsId) LEFT JOIN rubric AS r ON (r.rubric_id = qr.rubric_id)
					WHERE
						q.questionsId = 313651
						AND qd.question_id IS NULL