Justtechjobs.com Find a programming school near you






Online Campus Both


php-windows | 2001042

[PHP-WIN] MS SQL 2000 From: Jan Walter (john <email protected>)
Date: 04/21/01

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 <email protected> private e-mail mailto:john <email protected> ICQ#: 28353428 __________________________________________________________________________________________

==========================================================================================

-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe <email protected> For additional commands, e-mail: php-windows-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>