Problem using mssql_field_name (new user)

From: Date: Wed, 07 Aug 2002 15:04:36 +0000
Subject: Problem using mssql_field_name (new user)
Groups: php.db 
Request: Send a blank email to php-db+get-21048@lists.php.net to get a copy of this message
Hi, I am trying to add dynamically column headers to a table using the mssql_field_name function, but I get a "Call to undefined function: mssql_field_name()" when I use it. I can use other functions from mssql. This is the code I am trying to run: for ($i = 0; $i <= $nfields - 1; $i++) { $fName = mssql_field_name($sesult, $i); echo $fName; } I can fill the table fine using this code. while ($row = mssql_fetch_row($result)) { $color = ($counter++ % 2) ? "e0e0e0" : "f0f0f0"; echo "<TR bgcolor=", $color, ">"; foreach ($row as $v) { echo "<TD>$v</TD>"; } echo "</TR>"; } Is there a different procedure to get the column names? I run Apache with mod_php4 (4.2.2) on a FreeBSD computer. PHP is compiled with cybase-ct (--with-sybase-ct). The MS SQL server is version 2000. I will greatly appreciate any help you could offer. Regards, federico

« previous php.db (#21048) next »