PHP Velho Oeste 2024

SDO_DAS_ChangeSummary::beginLogging

(^)

SDO_DAS_ChangeSummary::beginLogging Begin change logging

Açıklama

SDO_DAS_ChangeSummary::beginLogging ( void ) : void
Uyarı

Bu işlev DENEYSELDİR. Bu işlevin davranışı, ismi ve belgeleri PHP'nin sonraki sürümlerinde hiçbir duyuru yapılmaksızın değiştirilebilir. Bu riski göze alamayacaksanız bu işlevi kullanmayın.

Begin logging changes made to the SDO_DataObject.

Değiştirgeler

None.

Dönen Değerler

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