Re: Getting a mysql set info
| From: | debbie_dyer | Date: | Wed, 25 Sep 2002 08:39:11 +0000 |
| Subject: | Re: Getting a mysql set info | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117532@lists.php.net to get a copy of this message | ||
You need to use SHOW COLUMNS FROM table LIKE 'yoursetfieldname'
You can then retrieve the values from the ["Type"] column which will look
like - set('val1','val2'...etc) - you will need to parse this string
Debbie
----- Original Message -----
From: "Henry" <henry@teacake.f9.co.uk>
To: <php-general@lists.php.net>
Sent: Wednesday, September 25, 2002 8:57 AM
Subject: [PHP] Getting a mysql set info
> Hi All,
>
> I would like to get at the SET information for a particular field in a
MySQL
> database.
>
> I know how to get the type, length, name and flags alla the manual pages
> but;
>
> If I have a field which is of type SET
> ('one','two','three','four') how
can
> I get at this information from within PHP in order to generate a
collection
> of checkboxes for setting the field in HTML.
>
> Any Help Much Appreciated
>
> Henry
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>