내가 좋아하는 쿼리를 얻기 위해 젠드 라이브러리를 확장하는 것을 시도하고이 하나 그러나 내가 가지고있는 http://framework.zend.com/issues/browse/ZF-7570Zend 수정. 추가 MySQL의 FORCE INDEX 힌트
:
SELECT * FROM item i **force index(ix)** ORDER BY date LIMIT 100;
나는이 젠드 포럼 문제 솔루션 arround를하고 있어요 문제. 아래 코드를 살펴보십시오.
$select->forceIndex('index');
echo $select->assemble();
// I get the right SELECT query with the force index hint
$this->fecthAll($select);
// The server execute a wrong SELECT query without the force index hint
일부 도움이 되었습니까? 내가 에코 절을 제거하면,하지만, fetchAll 오른쪽 쿼리를 실행하는 이유 꽤 잘 모르겠습니다
'$ this-> fetchAll ($ select-> assemble())'? – MonkeyMonkey