|
Server IP : 10.111.40.2 / Your IP : 216.73.217.145 Web Server : Apache System : Linux webd002.cluster111.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : comimage ( 586) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/comimage/../comimage/arti/../taxiplus22.fr/archives/classes/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
class MySQLQuery{
//data members
private $strSQL;
private $databasename;
private $connection;
private $result;
public function __construct( $strSQL, $databasename, $connection ){
$this->strSQL = $strSQL;
$this->connection = $connection;
$this->databasename = $databasename;
if(!mysql_selectdb($databasename, $connection)){
throw new MySQLException(mysql_error(), mysql_errno());
}
if(!$this->result = mysql_query($strSQL, $connection)){
throw new MySQLException(mysql_error(), mysql_errno());
}
}
public function __destruct(){
$this->close();
}
public function getDatabaseName(){
return $this->databasename;
}
public function getNumberRows(){
return mysql_affected_rows($this->result);
}
public function getInsertId(){
return mysql_insert_id( $this->connection);
}
private function close(){
if(isset($this->result)){
unset($this->result);
}
}
}
?>
