MySQL. Issue with module design.
#2

Hello.

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'); // имя базы данных
?>
File dbconnect.php

Код:
$link = mysql_connect($host, $user, $passwd) or die('Could not connect to database');

}
File main.php

Код:
<?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»);
Hope it's more clear now.

Btw, i'm using R39 version of mysql plugin.
Reply


Messages In This Thread
MySQL. Issue with module design. - by ZZ - 15.06.2015, 17:25
Re: MySQL. Issue with module design. - by ZZ - 16.06.2015, 08:50
Re: MySQL. Issue with module design. - by mamorunl - 16.06.2015, 09:17
Re: MySQL. Issue with module design. - by ZZ - 16.06.2015, 09:45
Re: MySQL. Issue with module design. - by Vince - 16.06.2015, 09:58
Re: MySQL. Issue with module design. - by ZZ - 16.06.2015, 10:15
Re: MySQL. Issue with module design. - by Vince - 16.06.2015, 10:30

Forum Jump:


Users browsing this thread: 2 Guest(s)