SDO_DAS_ChangeSummary::beginLogging

(^)

SDO_DAS_ChangeSummary::beginLogging Begin change logging

Opis

SDO_DAS_ChangeSummary::beginLogging ( void ) : void
Ostrzeżenie

Ta funkcja jest w stadium EKSPERYMENTALNYM. Oznacza to, że zachowanie funkcji, jej nazwa, w zasadzie wszystko udokumentowane tutaj może zostać zmienione w przyszłych wersjach PHP bez wcześniejszego uprzedzenia. Używaj tej funkcji na własne ryzyko.

Begin logging changes made to the SDO_DataObject.

Parametry

None.

Zwracane wartości

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