Jump to content

[Postgres AND Php] Getting values from a 'fake' Enum field (..)


flaab

Recommended Posts

Hi :-)

 

I'll go straight to the point; MySql has a "native" ENUM|SET datatype that allows you to insert only certain values, and those values can be retrieved from the Php code to create a combobox.

 

Postgres does not have such datatype, so it has to be "emulated" like this...

 

create table foo
(
     enumField     varchar (check enumField in ('value1', 'value2'))
);

 

So far so good but...How can I retrieve those values from my Php code to create a combobox? :-)

 

Thx!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.