I use s SELECT query with MS SQL Server 2005 thus :-
SELECT TOP 1
t1.first_name,
t1.last_name,
t1.age,
status,
... more t1.fields ..
t2.description,
t2.category
FROM table1 t1, table2 t2
and then get the number of fields returned with
$fields = mssql_num_fields($result);
In my actual work only 22 fields are returned, whereas it should actually be 24 (two fields from table2 and 22 fields from table1.
If I cut and past my SELECT query into MS SQL Server Management Studio it returns the 24 fields expected.
Anyone know why please? It's driving me nuts