Background Image

FORUM

?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
밑에 소스로 실행을 해봤는데요
데이타 잘 가져오고
echo 'close-commit' ;  문장도 출력이 되는데요

큐브리드 메니저에서 트렌젝션 정보에
계속 남아있던데 원래 그런건가요??
아님 코드를 잘못짠건가요???

실행 코드---
<?php
include_once 'module.php' ;

//$resultObj = new CubridResult() ;
$DB = new CubridApi() ;
$DB->localConnect();

$q 'select * from board_set' ;
$resultObj $DB->query$q ) ;

while( 
$a $resultObj->fetch() )
{
    
print_r$a ) ;    
}

$q 'select * from board' ;
$resultObj $DB->query$q ) ;

while( 
$a $resultObj->fetch() )
{
    
print_r$a ) ;    
}
$DB->close();
?>

module.php ----------------

<?php


class 
CubridApi{
    private 
$conn ;
    private 
$result ;
    
    public function 
connect$host $user $pwd $name $port )
    {        
        
$conn cubrid_connect ($host ,  $port $name $user $pwd );
        if (
$conn) {
           
$this->conn $conn ;
        }else{
            echo 
"Error Code: "cubrid_error_code ();
            echo 
"Error Facility: "cubrid_error_code_facility ();
            echo 
"Error Message: "cubrid_error_msg ();
            
debug_print_backtrace();
            exit ;
        }
    }
    
    public function 
localConnect()
    {
        
$this->connect"localhost" "dba" '' "demodb" 33000 );        
    }
    
    
    public function 
close$conn '' )
    {
        if( empty(
$conn) ) $conn $this->conn 
        if( 
$conn cubrid_disconnect$conn ) ;
    }
        
    public function 
query$sql )
    {
        
$this->result cubrid_execute($this->conn$sql);        
        
$CubridResult = new CubridResult$this->conn $this->result ) ;
        return 
$CubridResult ;
    }
    
    public function 
fetch_test()
    {
         
$a cubrid_fetch ($this->result )    ;
         
print_r$a ) ;
    }
}



class 
CubridResult{
    private 
$conn ;
    private 
$result ;
    public function 
__construct$conn $result )
    {
        
$this->conn $conn 
        
$this->result $result 
    }
    
    public function 
fetch()
    {
        echo 
'fetch-call' ;
        if( 
$a cubrid_fetch ($this->result )    )
        {
        echo 
'fetch-return' ;            
            return 
$a ;
        }else{
        echo 
'fetch-commit' ;            
            
cubrid_commit ($this->conn);
            
$this->close() ;
            return 
false ;
        }        
    }
    
    public function 
close()    
    {
        
cubrid_close_request($this->result) ;
        if (
$failed) {
            echo 
'close-rollback' ;
            
cubrid_rollback ($this->conn);
        } else {
            echo 
'close-commit' ;            
            
cubrid_commit ($this->conn);
        }
    }
}
?>
  • ?
    cubebridge 2009.09.15 03:50
    답변이 늦어서 죄송합니다.
    트랜젝션 정보에 남아 있다는 정보를 어느 것을 통해서 확인하셨는지 알려주시기 바랍니다.
    관련 내용을 확인하여 더 정확한 답변을 드릴 수 있도록 하겠습니다.
    덧글 부탁드립니다.
  • ?
    addbasic 2009.09.17 02:44
    큐브리드 메니저에서 
    데이타베이스 오른쪽 버튼 ->
    데이타베이스 트렌젝션 정보 에서요~~

    글쓸떄는 집이었는데요
    새로고침을 막하니 8~9개로 유지되면서 돌아가더라구요

    다시해보니 
    9개 고정으로 있는 상태에서 변화가 없는거 보니깐;;

    제가 테스트를 잘못한건가봐요;;; 더해보고 궁금한거 있으면 글남기도록하겠습니다;; 

  1. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

    Date2024.04.23 Byadmin Views143888
    read more
  2. 큐브리드매니저의 아이콘 개선 요청

    Date2009.09.24 By고영진 Views14715
    Read More
  3. 큐브리드매니저에서 NULL값과 문자속성의 빈값을 구분하여 표시 필요

    Date2009.09.23 By고영진 Views17521
    Read More
  4. 큐브리드2008R2.0 설치 후 매니저에서 로그인시 발생하는 오류

    Date2009.09.23 By고영진 Views13213
    Read More
  5. 한글 깨짐

    Date2009.09.23 By짱똘 Views19893
    Read More
  6. Exception in thread "Thread-10" java.lang.NullPointerException

    Date2009.09.23 By김동진81 Views22974
    Read More
  7. cubrid manager 질의기능 중,,,,

    Date2009.09.22 By라솔 Views12130
    Read More
  8. php모듈 인식문제..

    Date2009.09.22 By호짱 Views12283
    Read More
  9. HA,64bit가 적용된 R2.0 에 대한 질문입니다.

    Date2009.09.19 By웃음이 Views21791
    Read More
  10. 질의 편집기로 부질의 유도테이블 쿼리실행에 대해

    Date2009.09.17 ByChans Views13557
    Read More
  11. broker 접속 오류

    Date2009.09.16 By단순미학 Views14284
    Read More
  12. 기본값 설정 문의

    Date2009.09.16 By칸의후계자 Views13600
    Read More
  13. jdbc 연결시 지속적으로 뜨는 exception.

    Date2009.09.15 By김동진81 Views13197
    Read More
  14. 큐브리드 Windows 설치 파일에 관하여..

    Date2009.09.15 ByStoneHouse Views12515
    Read More
  15. 명령줄로 DB시작하는 방법은 없나요?

    Date2009.09.14 By하두고 Views12949
    Read More
  16. 테이블 생성이 안되네요..;;

    Date2009.09.14 By미야프 Views13057
    Read More
  17. 큐브리드2008의 DB로드/언로드 기능으로 마이그레이션 방법 문의

    Date2009.09.11 By고영진 Views13911
    Read More
  18. 큐브리드2008(윈도우용) 설치 완료시 재부팅 여부 확인 과정 필요

    Date2009.09.11 By고영진 Views15663
    Read More
  19. CentOS 5.3 64bit, cubird 2008 r2.0 설치오류문제

    Date2009.09.10 By비타500 Views13930
    Read More
  20. 큐브리드 2.0설치 XE 한글데이터값이 이상

    Date2009.09.10 By나루토 Views12249
    Read More
  21. PHP 로 큐브리드 사용중에 commit 부분이 안먹는거 같은데 도움좀 요청해요 ㅠ

    Date2009.09.10 Byaddbasic Views11762
    Read More
Board Pagination Prev 1 ... 191 192 193 194 195 196 197 198 199 200 ... 213 Next
/ 213

Contact Cubrid

영업문의 070-4077-2112 / 기술문의 070-4077-2148 / 대표전화 070-4077-2110 / Email. contact_at_cubrid.com
Contact Sales