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 Views119
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4475
    read more
  3. broker 접속 오류

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

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

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

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

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

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

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

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

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

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

    Date2009.09.10 Byaddbasic Views8331
    Read More
  14. 외래키 등록 오류

    Date2009.09.10 By단순미학 Views10026
    Read More
  15. cubrid_execute 혹은 cubrid_prepare API를 이용하여 PHP에서 insert 시 ...

    Date2009.09.09 By아장아장 Views9284
    Read More
  16. delete

    Date2009.09.09 By짱똘 Views8804
    Read More
  17. CUBRID 매니저 서버 연결 오류

    Date2009.09.09 By지용 Views11124
    Read More
  18. Manager 접속오류

    Date2009.09.09 By단순미학 Views11973
    Read More
  19. Your transaction (index 4, dba@LoveME|3952) has been unilaterally aborted by the system.큐브리드 로그파일도 같이 넣었어요..

    Date2009.09.08 By지니 Views28017
    Read More
  20. 기본적인 JDBC 응용 샘플 TEST에서

    Date2009.09.08 By지니 Views13167
    Read More
  21. asc, desc 기능 존재 여부와 sort 속도.

    Date2009.09.08 By아장아장 Views14422
    Read More
  22. MS-SQL을 CUBRID로 마이그레이션 하는 방법.

    Date2009.09.07 By후추 Views9870
    Read More
Board Pagination Prev 1 ... 179 180 181 182 183 184 185 186 187 188 ... 200 Next
/ 200

Contact Cubrid

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