note 90808 added to function.mysql-query
| From: | phpfan at smoothwave dot co dot uk | Date: | Mon, 11 May 2009 13:20:51 +0000 |
| Subject: | note 90808 added to function.mysql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154443@lists.php.net to get a copy of this message | ||
MyDB.php :
<?php
class MyDB {
private $server;
private $database;
private $username;
private $password;
private $connection;
public function MyDB ($server, $database, $username, $password) {
$this->setServer($server);
$this->setDatabase($database);
$this->setUsername($username);
$this->setPassword($password);
}
public function openConnection () {
$Connection = @mysql_connect($this->server, $this->username, $this->password);
if(!$Connection) {
return($Connection);
}
mysql_select_db($this->database);
$this->connection = $Connection;
return(1);
}
public function closeConnection () {
mysql_close($this->connection);
}
public function accessDB ($sql) {
$rawData = mysql_query($sql);
return($rawData);
}
public function getServer () {
return($this->server);
}
public function getDatabase () {
return($this->database);
}
public function getUsername () {
return($this->username);
}
public function getPassword () {
return($this->password);
}
public function setServer ($server) {
$this->server = $server;
}
public function setDatabase ($database) {
$this->database = $database;
}
public function setUsername ($username) {
$this->username = $username;
}
public function setPassword ($password) {
$this->password = $password;
}
}
?>
----
Server IP: 209.41.74.194
Probable Submitter: 170.252.64.1
----
Manual Page -- http://www.php.net/manual/en/function.mysql-query.php
Edit -- https://master.php.net/note/edit/90808
Del: integrated -- https://master.php.net/note/delete/90808/integrated
Del: useless -- https://master.php.net/note/delete/90808/useless
Del: bad code -- https://master.php.net/note/delete/90808/bad+code
Del: spam -- https://master.php.net/note/delete/90808/spam
Del: non-english -- https://master.php.net/note/delete/90808/non-english
Del: in docs -- https://master.php.net/note/delete/90808/in+docs
Del: other reasons-- https://master.php.net/note/delete/90808
Reject -- https://master.php.net/note/reject/90808
Search -- https://master.php.net/manage/user-notes.php