SDO_DAS_ChangeSummary::beginLogging

(^)

SDO_DAS_ChangeSummary::beginLogging Begin change logging

Description

void SDO_DAS_ChangeSummary::beginLogging ( void )
Warning

This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk.

Begin logging changes made to the SDO_DataObject.

Parameters

None.

Return Values

None.

Коментарии

Автор:
<?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;

    }

}
2018-06-15 01:05:59
http://php5.kiev.ua/manual/ru/sdo-das-changesummary.beginlogging.html

    Поддержать сайт на родительском проекте КГБ