Jump to content

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);
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.