phpDocumentor php-db
[ class tree: php-db ] [ index: php-db ] [ all elements ]

Class: Mysql

Source Location: /php/db/Mysql.php

Class Mysql

Descendants
Child Class Description
MysqlImprove mysqli 연결 클래스

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From DBClient

DBClient::__construct()
DBClient::addSql()
sql history 기록하기
DBClient::affectedRows()
쿼리 실행에 영향을 받은 row의 수
DBClient::begin()
트랜잭션 시작
DBClient::bind()
prepare된 구문을 바인딩 한다.
DBClient::checkTemplateId()
템플릿 존재하는지에 대한 여부 체크
DBClient::close()
연결닫기
DBClient::commit()
commit
DBClient::connect()
연결
DBClient::createConnector()
연결자 생성 패턴
DBClient::createData()
DBData 객체 생성
DBClient::createProc()
프로시저를 실행할 객체 리턴 , 하위에서 구현해야합니다.
DBClient::data()
sqlData 축약형
DBClient::deleteFrom()
테이블 삭제
DBClient::error()
에러 리턴
DBClient::escape()
각각 DB별 문자열 escape
DBClient::execute()
prepare된 구문을 실행한다.
DBClient::fetch()
레코드 가져오기
DBClient::fetchAll()
전체 레코드 가져오기
DBClient::free()
메모리 해제
DBClient::freeStatement()
prepare 된 구문 메모리 해제
DBClient::getBindData()
result set 이 설정된 상태에서 바로 DBData 객체를 구함
DBClient::getConnection()
연결 resource 반환
DBClient::getData()
DBData 구함
DBClient::getExecute()
처리 결과 리턴
DBClient::getFieldCount()
필드 개수 가지고 오기
DBClient::getFieldList()
실행되어진 쿼리에 대해서 필드리스트를 가지고 온다.
DBClient::getFieldName()
필드 이름 가지고 오기
DBClient::getFieldType()
필드 타입 가지고 오기
DBClient::getFieldTypeList()
실행되어진 쿼리에 대해서 필드의 타입 리스트를 가지고 온다.
DBClient::getMetaData()
통합 메타 데이타 얻어오기
DBClient::getOne()
한개짜리 Record 얻어올 때사용
DBClient::getPageCount()
페이지 계산
DBClient::getPageCountQuery()
일반쿼리 페이지 계산
DBClient::getPageCountSubquery()
서브쿼리 페이지 계산
DBClient::getPageData()
paging 된 DBData 얻어오기
DBClient::getProperty()
연결속성 설정
DBClient::getResult()
쿼리 실행한 결과
DBClient::getSql()
실행된 sql 얻어오기
DBClient::getSqlTemplate()
SQL 템플릿 생성
DBClient::getStatement()
DBClient::getTypeConstant()
필드 타입(자료형)별 php용 전용 상수 얻어오기
DBClient::getTypeString()
필드 타입(자료형)별 DB에 입력될 수 있는 문자열 얻어오기
DBClient::is()
현재 DB 확인하기
DBClient::isConnected()
연결되어 있는지 여부를 알려줌
DBClient::meta()
getMetaData 축약형
DBClient::one()
sqlOne 축약형
DBClient::page()
sqlPage 축약형
DBClient::pageCount()
sqlPageCount 축약형
DBClient::prepare()
prepare
DBClient::printSql()
실행된 sql 출력하기
DBClient::query()
쿼리 실행하기
DBClient::rollback()
rollback
DBClient::runOption()
옵션 실행
DBClient::seek()
result set 이동
DBClient::set()
연결설정
DBClient::setConfig()
연결설정, /php/db/conf/{name}.ini 파일에 설정 저장
DBClient::setConnection()
연결 resource 설정
DBClient::setExecute()
처리결과 설정
DBClient::setResult()
기본 결과셋을 설정
DBClient::setStatement()
DBClient::sql()
sql id 로 쿼리 실행
DBClient::sqlData()
sql id 로 DBData 얻어오기
DBClient::sqlOne()
sql id 로 DBData 얻어오기
DBClient::sqlPage()
sql id 로 페이징된 DBData 얻어오기
DBClient::sqlPageCount()
일반쿼리 페이지 계산
DBClient::template()
getSqlTemplate 축약형
DBClient::ts()
getTypeString 별칭
DBClient::_connect()
연결 리소스 리턴
DBClient::__destruct()
소멸자
DBClient::__get()
속성 읽어오기 , getAttribute() 와 같은 역할입니다.
DBClient::__set()
속성 설정하기 , setAttribute() 와 같은 역할입니다.

Inherited From PObject

PObject::__construct()
생성자
PObject::display()
객체 문자열을 출력
PObject::equals()
객체 비교 (수정 필요)
PObject::getClass()
PObject::getObjValue()
객체인지 아닌지 판별해서 PObject 형 객체이면 toString() 메소드로 문자열을 반환하고 일단 자료형이면 그 형태 그대로 리턴한다
PObject::isObject()
객체 확인
PObject::toString()
객체 문자열로 변환
PObject::__toString()
magic methods 추가 , toString() 의 값을 그대로 리턴한다.

Inherited From DBClient

DBClient::PATH_CONF
DBClient::PATH_SQL

[ Top ]
Method Summary
Mysql   __construct()   생성자
int   affectedRows()   실행된 row 수
bool   begin()   트랜잭션 시작
void   bind()   구현안됨
void   close()   연결 닫기
bool   commit()   commit
string   error()   에러 메세지 리턴
string   escape()   문자열 escape
void   execute()   구현안됨
array   fetch()   실행된 select 쿼리에 대해서 fetch 를 통해 한 행(row)을 리턴한다.
bool   free()   메모리 해제
string   getClientEncoding()   클라이언트 인코딩을 얻어온다.
int   getFieldCount()   쿼리의 결과로 나온 필드의 개수를 리턴한다.
string   getFieldName()   정해진 위치의 필드 이름을 얻어온다.
string   getFieldType()   정해진 위치의 필드 타입을 얻어온다.
void   getInsertId()  
DBData   getPageData()   select 쿼리에 대해서 페이징된 DBData를 리턴한다.
string   getTypeString()   필드 타입(자료형)별 DB에 입력될 수 있는 문자열 얻어오기
void   prepare()   구현안됨
resource   query()   일반 쿼리 실행
bool   rollback()   rollback
void   runOption()   기본 속성 이외의 다른속성 실행할 때
bool   seek()   커서 이동
void   selectDB()   DB 선택하기
void   setEncoding()   서버 인코딩을 설정한다.
resource   _connect()   database 연결 생성

[ Top ]
Methods
Constructor __construct  [line 19]

  Mysql __construct( [ $option = ''], [ $type = 'product']  )

생성자

Parameters:
   $option: 
   $type: 

API Tags:
Access:  public


Redefinition of:
DBClient::__construct()

Redefined in descendants as:

[ Top ]
affectedRows  [line 62]

  int affectedRows( )

실행된 row 수


API Tags:
Access:  public


Redefinition of:
DBClient::affectedRows()
쿼리 실행에 영향을 받은 row의 수

Redefined in descendants as:

[ Top ]
begin  [line 72]

  bool begin( )

트랜잭션 시작


API Tags:
See:  Mysql::commit(), Mysql::rollback();
Access:  public


Redefinition of:
DBClient::begin()
트랜잭션 시작

[ Top ]
bind  [line 322]

  void bind( )

구현안됨


API Tags:
Access:  public

Information Tags:
Todo:  미구현

Redefinition of:
DBClient::bind()
prepare된 구문을 바인딩 한다.

Redefined in descendants as:

[ Top ]
close  [line 79]

  void close( )

연결 닫기


API Tags:
Access:  public


Redefinition of:
DBClient::close()
연결닫기

Redefined in descendants as:

[ Top ]
commit  [line 92]

  bool commit( )

commit

mssql은 자동으로 commit을 하기 때문에 자동commit 을 하지 않을려면 반드시 begin() 메소드를 먼저 실행해야한다.


API Tags:
See:  Mysql::begin(), Mysql::rollback();
Access:  public


Redefinition of:
DBClient::commit()
commit

[ Top ]
error  [line 102]

  string error( )

에러 메세지 리턴


API Tags:
Return:  에러 메세지
Access:  public


Redefinition of:
DBClient::error()
에러 리턴

Redefined in descendants as:

[ Top ]
escape  [line 112]

  string escape( string $str  )

문자열 escape

Parameters:
string   $str:  escape 될 문자열

API Tags:
Return:  escape 된 문자열
Access:  public


Redefinition of:
DBClient::escape()
각각 DB별 문자열 escape

Redefined in descendants as:

[ Top ]
execute  [line 331]

  void execute( )

구현안됨


API Tags:
Access:  public

Information Tags:
Todo:  미구현

Redefinition of:
DBClient::execute()
prepare된 구문을 실행한다.

Redefined in descendants as:

[ Top ]
fetch  [line 124]

  array fetch( resource $result  )

실행된 select 쿼리에 대해서 fetch 를 통해 한 행(row)을 리턴한다.

리턴되는 값은 array('필드' => 'ㅁㅁㅁ', ...); 형태를 가진다.

Parameters:
resource   $result:  select 결과로 나온 resource

API Tags:
Return:  row 데이타
Access:  public


Redefinition of:
DBClient::fetch()
레코드 가져오기

Redefined in descendants as:
  • MysqlImprove::fetch() : 실행된 select 쿼리에 대해서 fetch 를 통해 한 행(row)을 리턴한다.

[ Top ]
free  [line 133]

  bool free( $result  )

메모리 해제

Parameters:
   $result: 

API Tags:
Access:  public


Redefinition of:
DBClient::free()
메모리 해제

Redefined in descendants as:

[ Top ]
getClientEncoding  [line 142]

  string getClientEncoding( )

클라이언트 인코딩을 얻어온다.


API Tags:
Return:  인코딩값, ex) utf8, euckr, latin1, ...
Access:  public


[ Top ]
getFieldCount  [line 153]

  int getFieldCount( resource $result  )

쿼리의 결과로 나온 필드의 개수를 리턴한다.

Parameters:
resource   $result:  select 결과로 나온 resource

API Tags:
Return:  필드개수
Access:  public


Redefinition of:
DBClient::getFieldCount()
필드 개수 가지고 오기

Redefined in descendants as:

[ Top ]
getFieldName  [line 164]

  string getFieldName( resource $result, int $i  )

정해진 위치의 필드 이름을 얻어온다.

Parameters:
resource   $result:  select 결과로 나온 resource
int   $i:  필드 위치, 처음은 0

API Tags:
Return:  필드이름
Access:  public


Redefinition of:
DBClient::getFieldName()
필드 이름 가지고 오기

Redefined in descendants as:

[ Top ]
getFieldType  [line 175]

  string getFieldType( resource $result, int $i  )

정해진 위치의 필드 타입을 얻어온다.

Parameters:
resource   $result:  select 결과로 나온 resource
int   $i:  필드 위치, 처음은 0

API Tags:
Return:  필드타입
Access:  public


Redefinition of:
DBClient::getFieldType()
필드 타입 가지고 오기

Redefined in descendants as:

[ Top ]
getInsertId  [line 179]

  void getInsertId( )



Redefined in descendants as:

[ Top ]
getPageData  [line 192]

  DBData getPageData( string $query, [int $page = 1], [int $count = 10], string $baseClass  )

select 쿼리에 대해서 페이징된 DBData를 리턴한다.

Parameters:
string   $query:  select 쿼리
int   $page:  현재 페이지
int   $count:  페이지당 리스트 개수
string   $baseClass:  DBData 를 상속한 클래스 , 기본값 DBData


Redefinition of:
DBClient::getPageData()
paging 된 DBData 얻어오기

[ Top ]
getTypeString  [line 210]

  string getTypeString( string $type, mixed $value, [boolean $is_null = false]  )

필드 타입(자료형)별 DB에 입력될 수 있는 문자열 얻어오기

Parameters:
string   $type:  타입문자열
mixed   $value:  입력값
boolean   $is_null:  널을 체크할 것인지 여부 , true 널체크, false 널 체크 안함

API Tags:
Return:  변환된 문자열
Access:  public


Redefinition of:
DBClient::getTypeString()
필드 타입(자료형)별 DB에 입력될 수 있는 문자열 얻어오기

[ Top ]
prepare  [line 313]

  void prepare( )

구현안됨


API Tags:
Access:  public

Information Tags:
Todo:  미구현

Redefinition of:
DBClient::prepare()
prepare

Redefined in descendants as:

[ Top ]
query  [line 273]

  resource query( string $sql  )

일반 쿼리 실행

Parameters:
string   $sql:  실행될 query

API Tags:
Return:  실행 resource
Access:  public


Redefinition of:
DBClient::query()
쿼리 실행하기

Redefined in descendants as:

[ Top ]
rollback  [line 285]

  bool rollback( )

rollback


API Tags:
Access:  public


Redefinition of:
DBClient::rollback()
rollback

[ Top ]
runOption  [line 43]

  void runOption( )

기본 속성 이외의 다른속성 실행할 때


API Tags:
See:  runOption()
Access:  public


Redefinition of:
DBClient::runOption()
옵션 실행

[ Top ]
seek  [line 295]

  bool seek( int $count  )

커서 이동

Parameters:
int   $count:  이동시킬 상대위치, 사직행은 0

API Tags:
Access:  public


Redefinition of:
DBClient::seek()
result set 이동

Redefined in descendants as:

[ Top ]
selectDB  [line 53]

  void selectDB( $db_name  )

DB 선택하기

Parameters:
   $db_name: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
setEncoding  [line 304]

  void setEncoding( [$encoding $encoding = "utf8"]  )

서버 인코딩을 설정한다.

Parameters:
$encoding   $encoding:  string 인코딩타입, 기본값 utf8, 한글은 euckr

API Tags:
Access:  public


[ Top ]
_connect  [line 28]

  resource _connect( )

database 연결 생성


API Tags:
Return:  연결 resource
Access:  protected


Redefinition of:
DBClient::_connect()
연결 리소스 리턴

Redefined in descendants as:

[ Top ]

Documentation generated on Fri, 09 Apr 2010 11:57:27 +0900 by phpDocumentor 1.4.3