fdsubs at t-online.hu
Thu Jul 27 15:28:31 EDT 2006
On Jul 27, 2006, at 17:53, Rich Young wrote:
>> $connect = odbc_connect("MSSQLTest", "test_user", "passX") or
>> $result = odbc_exec($connect, $query);
>> $temp = mssql_num_rows($result) ;
> Okay, I don't see anything obviously wrong here except that I'm not
> if it is OK to use mssql_num_rows($result) when $result was
> with odbc_exec.
No, actually, that is very obviously wrong.
You absolutely can't mix mssql and odbc functions.
Choose whether you're going through the mssql extension (php mssql
ext -> FreeTDS dblib driver) or the odbc extension (php odbc ext ->
unixODBC/iODBC driver manager -> FreeTDS odbc driver) and stick with it.
If you really want to, you can use both even in a single script,
however, you must initialize the connection with both then.
More information about the FreeTDS