Re: MS SQL 2000
| From: | Frank M. Kromann | Date: | Sat, 21 Apr 2001 16:48:01 +0000 |
| Subject: | Re: MS SQL 2000 | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-6948@lists.php.net to get a copy of this message | ||
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:Jan.Walter@lerach.cz
> private e-mail mailto:john@lerach.cz
> ICQ#: 28353428
> __________________________________________________________________________________________
>
> ==========================================================================================
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>