note 107554 added to function.mysql-connect
| From: | pvviswanathanpv at gamil dot com | Date: | Fri, 17 Feb 2012 07:30:31 +0000 |
| Subject: | note 107554 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186184@lists.php.net to get a copy of this message | ||
simple connection object
using server ip address and mysql port
<?php
class connection
{
public $link;
public $host;
function __construct()
{
$ip=$_SERVER['SERVER_ADDR'];
$port=":3306";
$this->host="$ip$port";
}
function __destruct()
{
}
function start()
{
$this->link=mysql_connect($this->host,"viswa","feather");
mysql_select_db("commun",$this->link);
}
function stop()
{
mysql_close($this->link);
}
};
$database= new connection();
?>
----
Server IP: 59.162.86.8
Probable Submitter: 117.204.119.42
----
Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php
Edit -- https://master.php.net/note/edit/107554
Del: integrated -- https://master.php.net/note/delete/107554/integrated
Del: useless -- https://master.php.net/note/delete/107554/useless
Del: bad code -- https://master.php.net/note/delete/107554/bad+code
Del: spam -- https://master.php.net/note/delete/107554/spam
Del: non-english -- https://master.php.net/note/delete/107554/non-english
Del: in docs -- https://master.php.net/note/delete/107554/in+docs
Del: other reasons-- https://master.php.net/note/delete/107554
Reject -- https://master.php.net/note/reject/107554
Search -- https://master.php.net/manage/user-notes.php