note 10024 added to mssql_connect

From: Date: Thu, 07 Dec 2000 17:32:05 +0000
Subject: note 10024 added to mssql_connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-8503@lists.php.net to get a copy of this message
I have problems running the code in first note! ERROR : Warning: Supplied argument is not a valid MS SQL-result resource in - on line 14 No data? But I input data in database teste!!!! <? $hostname = "orion"; $username = "sa"; $password = ""; $dbName = "teste"; MSSQL_CONNECT($hostname,$username,$password) or DIE("DATABASE FAILED TO RESPOND."); mssql_select_db($dbName) or DIE("Table unavailable"); $query = "SELECT * FROM a"; $result = MSSQL_QUERY($query); $number = MSSQL_NUM_ROWS($result); $i=0; if ($number == 0) : print "No data?"; elseif ($number > 0) : print "Data: "; while ($i < $number) : $name = mssql_result($result,$i,"Name"); print $name; print " "; $i++; endwhile; endif; ?> http://www.php.net/manual/function.mssql-connect.php

« previous php.notes (#8503) next »