note 36801 added to function.mssql-fetch-field
| From: | Reynard at rn2 dot php dot net | Date: | Wed, 22 Oct 2003 23:40:05 +0000 |
| Subject: | note 36801 added to function.mssql-fetch-field | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-59150@lists.php.net to get a copy of this message | ||
If you want to describe table structure (like mysql 'desc table' command), sending this
query might help:
<?
$sql = "SELECT c.name, c.isnullable, c.length, c.colstat, t.name type
FROM syscolumns c, systypes t, sysobjects o
WHERE o.name = '$table' AND o.id = c.id AND c.xtype = t.xtype";
?>
I suspect the colstat field in syscolumns table indicates primary key when its value is 1
----
Manual Page -- http://www.php.net/manual/en/function.mssql-fetch-field.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+36801
Delete -- http://master.php.net/manage/user-notes.php?action=delete+36801&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+36801&report=yes
Search -- http://master.php.net/manage/user-notes.php