<pre><?php echo"Welcome";//*******************************1st Echo Test $Server = "localhost"; $User = "your_name"; $Pass = "your_password"; $DB = "examples"; //connection to the database $dbconn = mssql_connect($Server, $User, $Pass) or die("Couldn't connect to SQL Server on $Server"); //select a database to work with $selected = mssql_select_db($DB, $dbconn) or die("Couldn't open database $myDB"); //declare the SQL statement that will query the database $query = "SELECT name from test "; //execute the SQL query and return records $result = mssql_query($query); $numRows = mssql_num_rows($result); echo "<h1>" . $numRows . " Row" . ($numRows == 1 ? "" : "s") . " Returned </h1>"; //display the results while($row = mssql_fetch_array($result)) { echo "<br>" . $row["name"]; } //close the connection mssql_close($dbconn); echo"Welcome";//*******************************2nd Echo Test ?>
extension=php_pdo_mssql.dll
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)