2

can someone explain for me the this attribute used in array?

$order = $this->createObject(Order::class) ->getCollection() ->addFieldToFilter('customer_id', $customer->getId()) ->addFieldToFilter('status',array('neq' => 'canceled')); 

what 'naq' => 'canceled'?

2 Answers 2

2

In this

 ->addFieldToFilter('status',array('neq' => 'canceled')); 

Here status is in array like: pending, success, canceled

So neq means status should not equal to canceled

neq acts as '!=' for the sql query in magento. Example - Select * from table where column != '1';

0

neq means Not Equals - neq

Example:

$itemList->addAttributeToFilter('sku', array('neq' => 'orderId')); 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.