Hi,

you can use the query() function for Zend_Db (ZF1) and write your custom
query:

$stmt = $db->query("SELECT userID FROM EMPLOYEE WITH (NOLOCK)");

NOLOCK is a Table Hints of SQL Server and should be used only as last
option in particular cases.
You can also use transactions with READUNCOMMITTED.
In Zend_Db we offer the setTransactionIsolationLevel() with the flag
SQLSRV_TXN_READ_UNCOMMITTED.

For more information about transtactions in Zend_Db:
http://framework.zend.com/manual/1.12/en/zend.db.adapter.html#zend.db.adapter.transactions

Regards,
Enrico Zimuel

On Thu, Sep 17, 2015 at 5:05 AM, vtsuper <[email protected]> wrote:

> I believe select_db haven't handle this case, so would someone teach me how
> to extend select_db and create my own method to handle 'nolock'?
>
> SELECT userID FROM EMPLOYEE WITH (NOLOCK)
> $select=$this->getAdapter()->select()->from(array('EMPLOYEE '),
> array('userID '));
>
>
>
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/how-to-use-zend-create-with-nolock-select-query-tp4662676p4662677.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
>
>
>


-- 

Enrico Zimuel
Senior Software Engineer | [email protected] Team           |
http://apigility.orgZend Framework Team      |
http://framework.zend.comZend Technologies Ltd.http://www.zend.com

Reply via email to