hi all,
i just encountered a strange problem. on one of my php pages, i'm using a mssql database. the problem wasn't connecting buut after it i tried this:
everything looks normal and it works fine as long as the database i select contains more then one table (when the query returns more then one record) or when i return more then one field. but when i dont, and the database only has one table. var dump outputs the same record twice.
also, when i execute the query in sql management studio 2005, it only shows 1 record.
it's easy enough to solve this, but i just want to know if i'm doing something wrong or if this is a bug in php?
i just encountered a strange problem. on one of my php pages, i'm using a mssql database. the problem wasn't connecting buut after it i tried this:
Code:
$id = mssql_connect($server.",1433",$user,$pw);
mssql_select_db($db,$id);
$query = mssql_query("SELECT DISTINCT name FROM sys.Tables");
$tables = mssql_fetch_array($query);
var_dump($tables);
also, when i execute the query in sql management studio 2005, it only shows 1 record.
it's easy enough to solve this, but i just want to know if i'm doing something wrong or if this is a bug in php?
Comment