SDO_DAS_ChangeSummary::beginLogging

(^)

SDO_DAS_ChangeSummary::beginLogging Begin change logging

설명

void SDO_DAS_ChangeSummary::beginLogging ( void )
Warning

이 함수는 실험적입니다. 이 함수의 작동, 함수의 이름, 그리고 관련된 모든 문서는 이후의 PHP 릴리즈에서 예고 없이 변경할 수 있습니다. 이 함수의 사용에 관한 것은 사용자 책임입니다.

Begin logging changes made to the SDO_DataObject.

인수

None.

반환값

None.

add a note add a note

User Contributed Notes 1 note

up
0
DAMNBOY
5 years ago
<?php

/**
* Created by PhpStorm.
* User: Kibo
* Date: 09-06-18
* Time: 18:48
*/
class Database
{

    protected
$url;
    protected
$user;
    protected
$passw;
    protected
$db;
    protected
$connection = null;

    public function
__construct($url,$user,$passw,$db){
       
$this->url = $url;
       
$this->user = $user;
       
$this->passw = $passw;
       
$this->db = $db;
    }

    public function
__destruct() {
        if (
$this->connection != null) {
           
$this->closeConnection();
        }
    }

    protected function
makeConnection(){
       
//Make a connection
       
$this->connection = new mysqli($this->url,$this->user,$this->passw,$this->db);
        if (
$this->connection->connect_error) {
            echo
"FAIL:" . $this->connection->connect_error;
        }
    }

    protected function
closeConnection() {
       
//Close the DB connection
       
if ($this->connection != null) {
           
$this->connection->close();
           
$this->connection = null;
        }
    }

    protected function
cleanParameters($p) {
       
//prevent SQL injection
       
$result = $this->connection->real_escape_string($p);
        return
$result;
    }

    public function
executeQuery($q){

       
//Is there a DB connection?
       
$this->makeConnection();
       
//check for SQL injection

        //execute query
       
$results = $this->connection->query($q);

        return
$results;

    }

}
To Top