Mysql查询错误#1241 - 操作数应包含1列

时间:2016-05-16 19:28:21

标签: php mysql

我正在尝试调试php mysql脚本,我在下面的查询中发现了错误

 SELECT `profile`.*,`extend`.* ,`online`.`hash` AS `online` FROM `skadate_profile` AS `profile` LEFT JOIN `skadate_profile_extended` AS `extend` USING( `profile_id` ) LEFT JOIN `skadate_profile_online` AS `online` USING( `profile_id` ) WHERE `profile`.`profile_id`!= 116 AND 1 AND `profile`.`profile_id` NOT IN ( SELECT `blocked_id` FROM `skadate_profile_block_list` WHERE `profile_id` =116 ) AND ( 16&IF( ISNULL(`match_religion`) OR `match_religion`=0, 0xffffffffffffffff, `match_religion` ) AND 16&IF( ISNULL(`religion`) OR `religion`=0, 0xffffffffffffffff, `religion` ) ) AND FIND_IN_SET('448','3,475,342,448') AND ( 16384&IF( ISNULL(`match_language_`) OR `match_language_`=0, 0xffffffffffffffff, `match_language_` ) AND 16384&IF( ISNULL(`language`) OR `language`=0, 0xffffffffffffffff, `language` ) ) AND ( 0xffffffffffffffff&IF( ISNULL(`sex`) OR `sex`=0, 0xffffffffffffffff, `sex` ) AND 1&IF( ISNULL(`match_sex`) OR `match_sex`=0, 0xffffffffffffffff, `match_sex` ) ) AND ( 1&IF( ISNULL(`match_resident_status`) OR `match_resident_status`=0, 0xffffffffffffffff, `match_resident_status` ) AND 7&IF( ISNULL(`resident_status`) OR `resident_status`=0, 0xffffffffffffffff, `resident_status` ) ) AND ( 8&IF( ISNULL(`match_occupation`) OR `match_occupation`=0, 0xffffffffffffffff, `match_occupation` ) AND 4294971400&IF( ISNULL(`occupation`) OR `occupation`=0, 0xffffffffffffffff, `occupation` ) ) AND ( 91&IF( ISNULL(`match_education`) OR `match_education`=0, 0xffffffffffffffff, `match_education` ) AND 1,28,92&IF( ISNULL(`education`) OR `education`=0, 0xffffffffffffffff, `education` ) ) AND ( `profile`.`status`='active' ) AND `profile`.`profile_id`!= 116 AND `profile`.`sex` != 1 LIMIT 0, 15

在phpmyadmin中运行的查询给出了错误1241操作数应该包含最后一部分中的1列,即

IF( ISNULL(`education`) OR `education`=0, 0xffffffffffffffff, `education` )

任何ideA如何解决这个问题..任何帮助都受到高度赞赏..

0 个答案:

没有答案
相关问题