<?php mssql_connect("192.168.1.100", "sa", "123456") or die("Could not connect: " . mssql_error()); mssql_select_db("realty_enhance"); $result = mssql_query("SELECT * FROM dbo.acity"); while ($row = mssql_fetch_array($result, MYSQL_NUM)) { printf ("ID: %s Name: %s", $row[0], $row[1]); } mssql_free_result($result); ?>