RE: Anybody have an example of connecting MSSQL?
| From: | Juan Carmona | Date: | Mon, 20 Aug 2001 16:36:24 +0000 |
| Subject: | RE: Anybody have an example of connecting MSSQL? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-8960@lists.php.net to get a copy of this message | ||
Here is an example more complete... (i think ;)
$cn = mssql_connect("<server_name>", "<user_id>",
"<password>");
mssql_select_db("<database_name>");
$rs = mssql_query("select * from products", $cn);
Best regards
Juan Carmona
Jeff Howard <jeff.howard@berry-hinckley.com> escribió en el mensaje de
noticias 20010813153636.74556.qmail@pb1.pair.com...
> I have been extremely successful using ASP and MS-SQL for a long time, but
> am making a transition to PHP. I've tried connecting to the SQL Server
> database, but have been unsuccessful. The way a data source is called in
> ASP is:
>
> database.open "Provider=SQLOLEDB;User Id=user;Password=password;Initial
> Catalog=mydatabase;Data Source=DATABASESERVER\SQLSERVER"
>
> How can I translate this into PHP?
>
>