Code: Select all
$conn = odbc_connect($dsn, $username, $password);
$RS = odbc_exec($conn, "select * from table");If you are on unix/linux box connecting to mssql it can be a pain, because you cant set up a dsn, but you have to mimic it with system variables. I am sure there is some documentation on how to do that, but I dont have time to look it up.