Zend Framework 2 Table Gateway USE INDEX

341 Views Asked by At

I'm using the ZF2 table gateway for a database select with following join:

$select->join('feedback'
    , new Expression('feedback_id = feedbackcar_feedback_id')
    , ['provider_foreign_id' => 'feedback_action_provider_foreign_id']
    , Select::JOIN_INNER);

How can I add "USE INDEX (idx_actionforeignid_productid_providerrecommend)"?

Is there any way?

1

There are 1 best solutions below

0
akond On

Zend\Db\Sql\Select is not flexible enough to avail such a feat. You will be better off with a manually written sql query.