|
Answer
by: George Kaloyanov, Aplus.Net Knowledge Base Support
You
can access your MS SQL database through PHP scripts. You will need the
following information:
- Hostname:
You have to use the name of the server that hosts
your database.
- SQL
Database Username: The username of your MS SQL Database.
- Database
Password: The password you set when adding your database to your plan.
Your
connect script will look something like
mssql_connect(‘server_hostname’,
‘mssql_username’,
‘mssql_password’)
Note:
If you do not know the hostname of the database
server, please contact our Customer Support team by
phone at 1 888 301 2516 (toll free) or 1 858 410 6900 for international
callers. You may contact Customer Support by email
at
,
please include your registration number so we can
locate your account.
You
can test your SQL connection by creating a simple PHP script using the
following code:
<?php
$link
= mssql_connect('hostname', 'mssql_user', 'mssql_password');
if
(!$link) {
die('Could not connect: ' . mssql_error());
}
echo
'Connected successfully';
mssql_close($link);
?>
Related
link:
·
How
do I access the SQL server which comes with my Windows hosting plan?
|