16.06.2015, 08:50
Hello.
Nobody knows?
Let me explain more clear:
In PHP, for example, following code is valid:
File dbsettings.php
File dbconnect.php
File main.php
Hope it's more clear now.
Btw, i'm using R39 version of mysql plugin.
Nobody knows?
Let me explain more clear:
In PHP, for example, following code is valid:
File dbsettings.php
Код:
<?php define('DBHOST', 'localhost'); // имя хоста define('DBUSER', 'root'); // имя пользователя define('DBPASSWD', ''); // пароль define('DBNAME', 'test'); // имя базы данных ?>
Код:
$link = mysql_connect($host, $user, $passwd) or die('Could not connect to database'); }
Код:
<?php require_once 'dbsettings.php'; require_once 'dconnect.php'; //here variables DBHOST, DBUSER is visible since they are global, also connection with mysql also established and i can do following $r=mysql_query («SELECT * FROM gb ORDER BY dt DESC»);
Btw, i'm using R39 version of mysql plugin.