Need help! mssql connect

snkey5193

New Member
Messages
2
Reaction score
0
Points
0
ok so im trying to connect to a data base in mssql threw my website hosted with x10hosting but i get a error on line 8 or a line with this in it mssql_connect

heres the page with the error

http://www.kramansro.net/test.php

heres my test code

Code:
<?php
$myServer = "76.31.255.120";
$myUser = "sa";
$myPass = "1234";
$myDB = "silk";

//connection to the database
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
  or die("Couldn't connect to SQL Server on $myServer");

//select a database to work with
$selected = mssql_select_db($myDB, $dbhandle)
  or die("Couldn't open database $myDB");

//declare the SQL statement that will query the database
$query = "SELECT id, name, year ";
$query .= "FROM cars ";
$query .= "WHERE name='BMW'";

//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 "<li>" . $row["id"] . $row["name"] . $row["year"] . "</li>";
}
//close the connection
mssql_close($dbhandle);
?>
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Hello,

MSSQL is not compiled on x10.
 

Anna

I am just me
Staff member
Messages
11,750
Reaction score
581
Points
113
It is not likely to be compiled on x10 in a near future, as far as I know there's no plans to do that.
Our servers run linux, and MSSQL would likely be more suitable for a windows host.
 
Top