Welcome Guest, Not a member yet? Register   Sign In
How To require for working with enum type field
#1

(This post was last modified: 06-14-2022, 06:06 AM by Ahmed Haroon.)

for enum type column to include in my modal form i go to official UserGuide and searched for enum and it returned only one link Database Forge Class where i search with Ctrl-F for word enum and found only one occurance. so, please help to have a working example for How To if I want to include enum type field in my form or grid (datatable) how I can handle with db values to add / update data thru form or show in my list view?  OR is it not recommended ( asking for above search result in official user guide ) OR something else?
regards.
Newbie here in CodeIgniter World !! Please appologize if any nonsense from me.  
environment: Windows 10, XAMPP 3.3.0, VS Code, SQLyog Community Ed. 
Reply
#2

See https://media.pragprog.com/titles/bksap1/31flavors.pdf
Reply
#3

(06-14-2022, 05:47 AM)kenjis Wrote: See https://media.pragprog.com/titles/bksap1/31flavors.pdf

thanks @kenjis for quick response, but this is not what I am looking for.
Newbie here in CodeIgniter World !! Please appologize if any nonsense from me.  
environment: Windows 10, XAMPP 3.3.0, VS Code, SQLyog Community Ed. 
Reply
#4

1. Enum does not matter. The usage is the same as for string type
2. Enum is anti-pattern, if the value set changes
Reply
#5

PHP Code:
// CI3 - status is an enum field in the database table!
'status' => $this->input->post('status'true),

// Would be the same for CI4. 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB