+ Reply to Thread
Results 1 to 4 of 4

Thread: Need help! mssql connect

  1. #1
    snkey5193 is offline x10Hosting Member snkey5193 is an unknown quantity at this point
    Join Date
    Nov 2010
    Posts
    2

    Need help! mssql connect

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

  2. #2
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: Need help! mssql connect

    Hello,

    MSSQL is not compiled on x10.
    Thanks,
    Brandon Long

  3. #3
    snkey5193 is offline x10Hosting Member snkey5193 is an unknown quantity at this point
    Join Date
    Nov 2010
    Posts
    2

    Re: Need help! mssql connect

    when will it

  4. #4
    Anna's Avatar
    Anna is offline I am just me Anna is a name known to allAnna is a name known to all
    Join Date
    Aug 2007
    Location
    Sweden
    Posts
    6,569

    Re: Need help! mssql connect

    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.
    Do you have trouble reaching your site?
    Check here first: News and Announcements


    Don't forget that x10hosting has an irc server as well. Come and join the fun
    server: irc.x10hosting.com, main channel: #x10hosting
    There's a lot helpful users there if need help building your site

+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 11-12-2010, 05:57 AM
  2. Replies: 2
    Last Post: 10-14-2010, 01:50 PM
  3. Replies: 1
    Last Post: 02-01-2010, 07:05 AM
  4. Remote MSSQL Connections Supported?
    By cwa3607 in forum Free Hosting
    Replies: 1
    Last Post: 04-22-2008, 08:54 AM
  5. Mssql
    By _jamz in forum Scripts & 3rd Party Apps
    Replies: 7
    Last Post: 05-18-2007, 03:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers