host, user, pass, name i mysql.php
Hej Eksperter.Nedenfor har jeg pastet mit mysql.php ind, men hvor er det helt nagtig jeg skal udfylde Host, User, Pass og name ? Nogen som kan hjælpe mig?
<?php
/* Mysql.php */
Class SQL
{
var $host = "localhost";
var $user = "";
var $pass = "";
var $name = "";
var $cid = "";
var $queries = 0;
var $rows = 0;
function SQL($host,$user,$pass,$name)
{
$this->host = $host;
$this->user = $user;
$this->pass = $pass;
$this->name = $name;
}
function Connect()
{
$this->cid = mysql_connect($this->host,$this->user,$this->pass) or die(mysql_error());
}
function Query($query)
{
$ret = @mysql_db_query($this->name,"$query",$this->cid) or die(mysql_error());
$this->rows = @mysql_num_rows($ret);
$this->queries++;
return $ret;
}
function Close()
{
mysql_close($this->cid);
}
}
?>