What version of the php_mssql.dll are you using ?
We had an error a while back where mssql_query returned a wrong value (true instead of
a ressource).
You could also add an extra parameter to the query function
$answer = mssql_query("SELECT * FROM table", $connection);
- Frank
P.S. If you are using an old version you should be able to download a new from
www.php4win.de.
> Hi all,
>
> I have the following problem with PHP using MS SQL 2000. The connection
> seems to be opened properly, but any usage of returned value from
> mssql_query() does not work as a parameter for functions like
> mssql_fetch_array, mssql_num_rows, etc., although it is printed as '1'.
>
> --
> This piece of code:
> --
> ****************************
> <?
> $connection = mssql_connect("ATHLON\LOCALHOST") or die("No connection");
>
> mssql_select_db("db", $connection);
>
> echo "Query answer: ".($answer = mssql_query("SELECT * FROM
> table"))."<br>";
> echo mssql_num_rows($answer);
> ?>
> ****************************
> --
> produces this page:
> --
> ****************************
> Query answer: 1
>
> Warning: Supplied argument is not a valid MS SQL-result resource in
> c:/users/john/php/mr/mssql.php on line 6
> ****************************
>
>
> Thank you for any hint
> --
>
>__________________________________________________________________________________________
>
>
>==========================================================================================
>
> Jan Walter, called John
> LERACH, s.r.o.
> phone nr. work: +420-2-78 22 619, home: +420-2-35 35 27 61
> on emergency call cell phone: +420-602-385 760
> work e-mail mailto:[EMAIL PROTECTED]
> private e-mail mailto:[EMAIL PROTECTED]
> ICQ#: 28353428
>
>__________________________________________________________________________________________
>
>
>==========================================================================================
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]