note 20819 deleted from function.mssql-connect by sander

From: Date: Wed, 17 Apr 2002 12:40:27 +0000
Subject: note 20819 deleted from function.mssql-connect by sander
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-29477@lists.php.net to get a copy of this message
Hi all, I tested some of mssql functions at MS SQL 2000 with PHP 4.1.2. It works okey. Also it works fine with SQL97 with PHP 4.0.1 (mssql70.dll). Sogo <? // ---- NECESSARY INPUTS ------- $hostname = "HOME"; $username = "sogo"; $password = "5555"; $dbName = "TEST"; $TableName = "CONTACTS"; // -- GETTING INFO FROM DATABASE --- mssql_connect($hostname,$username,$password) or DIE("DATABASE FAILED TO RESPOND."); mssql_select_db($dbName) or DIE("Table unavailable"); $query = "SELECT * FROM $TableName ORDER BY Age DESC"; $result = mssql_query($query); $RowsNo = mssql_num_rows($result); $FieldsNo = mssql_num_fields($result); for ($i=1; $i <= $FieldsNo; $i++){ $FieldInfo = mssql_fetch_field($result,$i-1); $FieldType = mssql_field_type($result,$i-1); $FieldName[$i] = mssql_field_name($result,$i-1); $FieldLen = mssql_field_length($result,$i-1); } // ---- End of for ($i=1; $i <= $FieldsNo; $i++) ?>

« previous php.notes (#29477) next »