Start now free!

Forums

Search  Users  Rules 
Close
Login:
Password:
Forgot your password?
Register
Login
 
Pages: 1
Reply
CIBlockElement::GetList() arrFilter() parametar question
 
Hello,

I need to filter the result of CIBlockElement::GetList() by specific property value of elements in catalog. The property is with a String type and the values seems like this -> 1|2|3|4 . I need to get all the elements which have 2 in this property, so what I'm doing is : CIBlockElement::GetList(array(),array("?PROPERTY_PROP6"=>"2")), it works, but if an element has a property with 1|12|3|4 value it will also be included in the list because 12 contains 2 and I don't need that. So is there a way to get only the elements which contains only 2.

Thank you! 
 
The below filter:
"?PROPERTY_PROP6"=>"2"
returns all elements whose scan code contains the substring "2".

Please use this:
"PROPERTY_PROP6"=>"2"
to get all elements whose scan code matches "2" exactly;
Pages: 1
Reply
Users browsing this topic
Reply form
Enter your Post*
More
Files:
Drag and drop one or more files here
or select a file from your computer
Files:
Upload files
 

Bitrix Partner Network has more than 7,000 IT professionals who put their trust in our technologies and assist customers with installation and maintenance. All Bitrix Partners enjoy lucrative discounts on our products and services. Join our Partner Network now! Submitting a Bitrix Partner application is very easy and quick!
Partner Program
Free Online Training
Subscribe to Bitrix News