PHP Velho Oeste 2024

SDO_DAS_ChangeSummary::beginLogging

(^)

SDO_DAS_ChangeSummary::beginLogging Commence la journalisation

Description

SDO_DAS_ChangeSummary::beginLogging ( void ) : void
Avertissement

Cette fonction est EXPERIMENTALE. Le comportement de cette fonction, son nom, et toute la documentation autour de cette fonction peut changer sans préavis dans une prochaine version de PHP. Cette fonction doit être utilisée à vos risques et périls.

Commence la journalisation des changements effectués au SDO_DataObject.

Liste de paramètres

Aucun.

Valeurs de retour

Aucune.

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