Answer the question
In order to leave comments, you need to log in
Why doesn't the LIKE condition work?
Hello. There is a standard Bitrix table with property values:
CREATE TABLE `b_iblock_element_right` (
`IBLOCK_ID` INT(11) NOT NULL,
`SECTION_ID` INT(11) NOT NULL,
`ELEMENT_ID` INT(11) NOT NULL,
`RIGHT_ID` INT(11) NOT NULL,
`IS_INHERITED` CHAR(1) NOT NULL COLLATE 'utf8_unicode_ci',
PRIMARY KEY (`RIGHT_ID`, `ELEMENT_ID`, `SECTION_ID`),
INDEX `ix_b_iblock_element_right_1` (`ELEMENT_ID`, `IBLOCK_ID`),
INDEX `ix_b_iblock_element_right_2` (`IBLOCK_ID`, `RIGHT_ID`)
)
COLLATE='utf8_unicode_ci'
ENGINE=InnoDB;
select * from b_iblock_element_property where IBLOCK_ELEMENT_ID = 1304566 AND `IBLOCK_PROPERTY_ID` = 740 AND `VALUE` = 'f830c4d1-9865-11e2-a058-00269e0aabeb'
select * from b_iblock_element_property where IBLOCK_ELEMENT_ID = 1304566 AND `IBLOCK_PROPERTY_ID` = 740 AND `VALUE` LIKE 'f830c4d1-9865-11e2-a058-00269e0aabeb'
Answer the question
In order to leave comments, you need to log in
The problem was solved: it turned out that in that record, there was a space at the end. Those. the value in the VALUE column looked like this: 'f830c4d1-9865-11e2-a058-00269e0aabeb '.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question