Jump to content

bezaleel

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Posts posted by bezaleel

  1. This should do it

    <?php

    $myServer = "888.88.88.888";
    $myUser = "888888";
    $myPass = "8888888";
    $myDB = "888888";

    // [color=red]$dbhandle = mssql_connect($myServer, $myUser, $myPass)  - This is where the error is. Missing semi-colon at end of line.[/color]
    $dbhandle = mssql_connect($myServer, $myUser, $myPass);
      //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 CartID FROM WSTOrders;";

    $selected = mssql_query($query);
    $numRows = mssql_num_rows($selected);
    echo "<h1>" . $numRows . " Row" . ($numRows == 1 ? "" : "s") . " Returned </h1>";

    //display the results
    while($row = mssql_fetch_array($selected))
    {
      echo $row["CartID"] . "<br />";
    }


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