public function sharedLock()
    {
        // Pack query then move it to write DB from read DB for transaction
        $sql = $this->_dbr->get_compiled_select();
        $this->_dbr->reset_query();

        return $this->_db->query("{$sql} LOCK IN SHARE MODE");
    }
public function sharedLock()
    {
        // Pack query then move it to write DB from read DB for transaction
        $sql = $this->_dbr->get_compiled_select();
        $this->_dbr->reset_query();

        return $this->_db->query("{$sql} LOCK IN SHARE MODE");
    }
public function sharedLock ( ) { // Pack query then move it to write DB from read DB for transaction $ sql = $ this -> _dbr -> get_compiled_select ( ) ; $ this -> _dbr -> reset_query ( ) ; return $ this -> _db -> query ( "{$sql} LOCK IN SHARE MODE" ) ; }
Share lock the selected rows in the table.

@example
$this->Model->find()->where('id', 123)
$result = $this->Model->sharedLock()->row_array();'

@return object CI_DB_result
Share lock the selected rows in the table .