note 33426 added to function.sybase-fetch-field
| From: | anthony at rack1 dot php dot net | Date: | Wed, 25 Jun 2003 16:44:59 +0000 |
| Subject: | note 33426 added to function.sybase-fetch-field | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50999@lists.php.net to get a copy of this message | ||
Bit short on comments and tips bout this one so head down to mysql_fetch_fields where the concept is
the same. I seemed to get an infinite loop over there using the $i counter tho, so I used a for loop
instead.
The list of properties you can get from what I've called $info is in the example to the mysql
equivalent.
//start of an example to print out column headings
echo "<table><tr>";
$numfields=sybase_num_fields($query);
for ($f=0;$f<=$numfields;$f++){
$info = sybase_fetch_field($query);
echo "<td> $info->name </td>";
}
echo "</tr><tr>";
----
Manual Page -- http://www.php.net/manual/en/function.sybase-fetch-field.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33426
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33426&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33426&report=yes