connection string for PHP and SQL2000 or access

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
gotserv
Forum Newbie
Posts: 3
Joined: Wed Apr 16, 2003 12:53 pm

connection string for PHP and SQL2000 or access

Post by gotserv »

I am looking for a connection string to use in perl as the hosting company I am with offers PHP on a windows 2000 server with only MSSQL or Access database support.

Does any one have any ideas?

thnx

jack
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

Post by lostboy »

access
$connection = odbc_connect("accessdbname", "", "");
print "Connected to datasource<BR><BR>";

if ($result = odbc_exec($connection, "SELECT * FROM postcard"))
print "Command executed successfully<BR><BR>";
else
print "Error while executing command<BR><BR>";

mssql - see http://www.php.net/manual/en/ref.mssql.php
Post Reply