Jump to content

PHP with MS SQL SERVER 2000


zairgotschi

Recommended Posts

Hi there.. I have a project in my school, and i'm gonna create a database driven website. I will use PHP 5.2 and MS SQL SERVER 2000. Can someone help me for a step by step tutorial for connecting php to MS SQL SERVER? and for example, my server is on a different computer, how can i link my page to connect to the MS SQL SERVER? Your reply is highly appreciated.. Thanks..

Link to comment
https://forums.phpfreaks.com/topic/149270-php-with-ms-sql-server-2000/
Share on other sites

For a tutorial No.. this is for HELP with php not a tutorial request section!

 

However!

it should be pretty simple if you alreay know the MySQL setup!

 

<?php
// Connect to MSSQL

$link=mssql_connect("server","user","pass");
$d=mssql_select_db("NorthWind", $db); 

// Do a simple query, select the version of 
// MSSQL and print it.
$query = mssql_query('SELECT * FROM table');
$row = mssql_fetch_array($query);

echo $row[0];

// Clean up
mssql_free_result($version);
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.