Skip to main content
adicionou 62 caracteres ao conteúdo
Fonte Link
Largato
  • 92,9mil
  • 18
  • 190
  • 261

SELECT works.grade_id FROM works INNER JOIN work_images ON work_images.work_id = works.id INNER JOIN work_students ON work_students.work_id = works.id RIGHT OUTER JOIN qrcodes on qrcodes.code = works.teacher_qrcode WHERE (works.school_id IS NOT NULL AND works.material_id > 0 AND works.teacher_qrcode IS NOT NULL AND work_students.student_qrcode IS NOT NULL) AND (work_students.student_qrcode = ('2odclt6c','s4001d5j8','s4000p3sd','0413g8vsj','i40008tia','2odco0dv','2odd12pn','0413gsqma','2odfkal3','0413a4i8u','2odg00n4','04137plis','2odehfpg','2odg9qhn','2oddpe4k','s40020n0c','i400112td','04136t1ti','0413agib3','0413a12o7')) LIMIT 6 OFFSET 0Tenho este select

SELECT
   `works`.`grade_id` FROM `works`
   INNER JOIN `work_images` ON `work_images`.`work_id` = `works`.`id`
   INNER JOIN `work_students` ON `work_students`.`work_id` = `works`.`id`
   RIGHT OUTER JOIN qrcodes on qrcodes.code = works.teacher_qrcode
WHERE
  (
     works.school_id IS NOT NULL
     AND works.material_id > 0
     AND works.teacher_qrcode IS NOT NULL
     AND work_students.student_qrcode IS NOT NULL
  )
  AND (work_students.student_qrcode =
     ('2odclt6c','s4001d5j8','s4000p3sd','0413g8vsj',
     'i40008tia','2odco0dv','2odd12pn','0413gsqma','2odfkal3','0413a4i8u','2odg00n4',
     '04137plis','2odehfpg','2odg9qhn','2oddpe4k','s40020n0c','i400112td','04136t1ti',
     '0413agib3','0413a12o7'))
LIMIT 6
OFFSET 0

ERROR 1241 (21000)E recebo este erro ao executar: Operand should contain 1 column(s)

ERROR 1241 (21000): Operand should contain 1 column(s)

Onde está faltando a coluna ?

SELECT works.grade_id FROM works INNER JOIN work_images ON work_images.work_id = works.id INNER JOIN work_students ON work_students.work_id = works.id RIGHT OUTER JOIN qrcodes on qrcodes.code = works.teacher_qrcode WHERE (works.school_id IS NOT NULL AND works.material_id > 0 AND works.teacher_qrcode IS NOT NULL AND work_students.student_qrcode IS NOT NULL) AND (work_students.student_qrcode = ('2odclt6c','s4001d5j8','s4000p3sd','0413g8vsj','i40008tia','2odco0dv','2odd12pn','0413gsqma','2odfkal3','0413a4i8u','2odg00n4','04137plis','2odehfpg','2odg9qhn','2oddpe4k','s40020n0c','i400112td','04136t1ti','0413agib3','0413a12o7')) LIMIT 6 OFFSET 0

ERROR 1241 (21000): Operand should contain 1 column(s)

Onde está faltando a coluna ?

Tenho este select

SELECT
   `works`.`grade_id` FROM `works`
   INNER JOIN `work_images` ON `work_images`.`work_id` = `works`.`id`
   INNER JOIN `work_students` ON `work_students`.`work_id` = `works`.`id`
   RIGHT OUTER JOIN qrcodes on qrcodes.code = works.teacher_qrcode
WHERE
  (
     works.school_id IS NOT NULL
     AND works.material_id > 0
     AND works.teacher_qrcode IS NOT NULL
     AND work_students.student_qrcode IS NOT NULL
  )
  AND (work_students.student_qrcode =
     ('2odclt6c','s4001d5j8','s4000p3sd','0413g8vsj',
     'i40008tia','2odco0dv','2odd12pn','0413gsqma','2odfkal3','0413a4i8u','2odg00n4',
     '04137plis','2odehfpg','2odg9qhn','2oddpe4k','s40020n0c','i400112td','04136t1ti',
     '0413agib3','0413a12o7'))
LIMIT 6
OFFSET 0

E recebo este erro ao executar:

ERROR 1241 (21000): Operand should contain 1 column(s)

Onde está faltando a coluna ?

adicionou 6 caracteres ao conteúdo
Fonte Link
user12010
  • 62
  • 1
  • 1
  • 5

SELECT works.grade_id FROM works INNER JOIN work_images ON work_images.work_id = works.id INNER JOIN work_students ON work_students.work_id = works.id RIGHT OUTER JOIN qrcodes on qrcodes.code = works.teacher_qrcode WHERE (works.school_id IS NOT NULL AND works.material_id > 0 AND works.teacher_qrcode IS NOT NULL AND work_students.student_qrcode IS NOT NULL) AND (work_students.student_qrcode = ('2odclt6c','s4001d5j8','s4000p3sd','0413g8vsj','i40008tia','2odco0dv','2odd12pn','0413gsqma','2odfkal3','0413a4i8u','2odg00n4','04137plis','2odehfpg','2odg9qhn','2oddpe4k','s40020n0c','i400112td','04136t1ti','0413agib3','0413a12o7')) LIMIT 6 OFFSET 0

ERROR 1241 (21000): Operand should contain 1 column(s)

What is the problemOnde está faltando a coluna ?

SELECT works.grade_id FROM works INNER JOIN work_images ON work_images.work_id = works.id INNER JOIN work_students ON work_students.work_id = works.id RIGHT OUTER JOIN qrcodes on qrcodes.code = works.teacher_qrcode WHERE (works.school_id IS NOT NULL AND works.material_id > 0 AND works.teacher_qrcode IS NOT NULL AND work_students.student_qrcode IS NOT NULL) AND (work_students.student_qrcode = ('2odclt6c','s4001d5j8','s4000p3sd','0413g8vsj','i40008tia','2odco0dv','2odd12pn','0413gsqma','2odfkal3','0413a4i8u','2odg00n4','04137plis','2odehfpg','2odg9qhn','2oddpe4k','s40020n0c','i400112td','04136t1ti','0413agib3','0413a12o7')) LIMIT 6 OFFSET 0

ERROR 1241 (21000): Operand should contain 1 column(s)

What is the problem ?

SELECT works.grade_id FROM works INNER JOIN work_images ON work_images.work_id = works.id INNER JOIN work_students ON work_students.work_id = works.id RIGHT OUTER JOIN qrcodes on qrcodes.code = works.teacher_qrcode WHERE (works.school_id IS NOT NULL AND works.material_id > 0 AND works.teacher_qrcode IS NOT NULL AND work_students.student_qrcode IS NOT NULL) AND (work_students.student_qrcode = ('2odclt6c','s4001d5j8','s4000p3sd','0413g8vsj','i40008tia','2odco0dv','2odd12pn','0413gsqma','2odfkal3','0413a4i8u','2odg00n4','04137plis','2odehfpg','2odg9qhn','2oddpe4k','s40020n0c','i400112td','04136t1ti','0413agib3','0413a12o7')) LIMIT 6 OFFSET 0

ERROR 1241 (21000): Operand should contain 1 column(s)

Onde está faltando a coluna ?

Fonte Link
user12010
  • 62
  • 1
  • 1
  • 5

ERROR 1241 (21000): Operand should contain 1 column(s)

SELECT works.grade_id FROM works INNER JOIN work_images ON work_images.work_id = works.id INNER JOIN work_students ON work_students.work_id = works.id RIGHT OUTER JOIN qrcodes on qrcodes.code = works.teacher_qrcode WHERE (works.school_id IS NOT NULL AND works.material_id > 0 AND works.teacher_qrcode IS NOT NULL AND work_students.student_qrcode IS NOT NULL) AND (work_students.student_qrcode = ('2odclt6c','s4001d5j8','s4000p3sd','0413g8vsj','i40008tia','2odco0dv','2odd12pn','0413gsqma','2odfkal3','0413a4i8u','2odg00n4','04137plis','2odehfpg','2odg9qhn','2oddpe4k','s40020n0c','i400112td','04136t1ti','0413agib3','0413a12o7')) LIMIT 6 OFFSET 0

ERROR 1241 (21000): Operand should contain 1 column(s)

What is the problem ?