Table of Contents  | Policies | FAQs | Features Glossary | Tips & Tutorials | Downloads
Support Manual: Database Features
Return to Table of Contents

MySQL
Chilisoft ASP
PHP
Miva Empresa



MySQL
 Just send an e-mail to support to request that your account be setup with an MySQL database. Be certain to include your domain name in the email.

 Once your database is created, to access it, you will need to use either Telnet (SSH) or a Perl or PHP script. Click here for examples of Perl/PHP use with MySQL.

 If using Telnet (SSH), from the prompt, type:

mysql -uxxxx -pyyy databasename

where
xxx is a username
yyy is a password

Press Enter.

 To receive help, at the mysql prompt, type:

 mysql> help

 For additional help with MySQL, please refer to http://www.mysql.com/doc/T/u/Tutorial.html.

To connect to mySQL using mySQLPerl Module, use the following outline to connect and begin querying the mySQL server from a Perl script. Remember that you cannot connect to your databases remotely due to security concerns. You can only connect from localhost.

1. Declarations
You must require the mySQL package for your script to function properly. Do this by including the following line in your code: use Mysql;

2. Connect to the Database
Somewhere near the beginning of your script, you need to make your initial connection to the database server. Using the following form, substitute your database, username, and password for the examples to connect successfully. 
Mysql->connect('localhost','DATABASENAME','USERNAME','USERPASSWORD');

3. Executing a Query
You are now ready to begin querying the database server. [Most problems that you may incur will generally occur due to invalid permission settings for the specified user.]

To connect to mySQL through PHP, use the following outline to connect and begin querying the mySQL server from within your PHP scripts. Remember that you cannot connect to your databases remotely due to security reasons. You can only connect to them from localhost.

1. Connect to the mySQL Server
Use the following statement to connect to the database server. Substitute the username, and password for ones you have created in the WebControl System.

MYSQL_CONNECT('localhost','USERNAME','PASSWORD');

2. Select Your Database
Use the following statement to select the database you wish to connect to. Make sure you substitute the example with your database name.
@mysql_select_db("DATABASENAME");

3. Executing A Query
You are now ready to execute your queries. (Most problems that arise with your scripts will be due to incorrect permission settings.)

Chilisoft ASP
 
Active Server Pages are an effective way to create web server applications.  Active Server Pages are web pages saved with the file extension “.asp”.  The web server will recognize the file extension, process it and send the results of the processing to the web client’s browser as an HTML page. 

Active Server Pages can be written in a number of scripting languages such as JScript, PerlScript and VBScript.  An ASP
file can contain text, scripts and HTML TAGS.  The scripts on an ASP page are interpreted on the server therefore the
browser does not need to support scripting.
 
To connect to your MySQL database using ASP, use the following syntax:

set conn = Server.CreateObject("ADODB.Connection")

conn.Open "Driver={MySQL}; SERVER=localhost; DATABASE=your_database_name; UID=your_main_user_id; PWD=your_database_password"

        For additional help, please refer to the Chilisoft site at http://chilisoft.com/caspdoc/30html/index.html.

PHP
PHP4 is installed on all servers

 Any web page you create that uses PHP should be saved with a .php, .php3 or .php4 extension to be parsed properly.

 For additional help, please visit http://www.php.net.

Miva Empresa
Miva Empresa is installed on all of our servers. The Miva engine, Miva Empresa, provides a platform for the Miva storefront and
custom applications to run on the Web server. You may use the Miva engine to create dynamic Web sites that integrate scripting, database, and commerce features. They can be run on the Web server or your Windows-based PC. This feature is not to be confused with the popular Miva Merchant storefront software that runs on top of the Miva engine. Miva Merchant can be purchased and installed on your hosting plan or server. Miva has an excellent Miva Script reference manual located at http://www.miva.com/docs/ScriptMan_html/MivaScriptMan.html.