Jump to content

Search the Community

Showing results for tags 'enum'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. Hi everyone. I have another question, which will hopefully be the last piece to get my application going. I have a MySQL table with an enum field, with a few values (Value1, Value2, Value3, Value4). I have a HTML form that is pulling over fields from the same table, but those other fields are varchar fields. I'm wanting to create a drop down box which is dynamically populated with those enum values, and that defaults to the currently selected field. I have found a few examples of this, but they all seem to be deprecated mysql_* code, whereas I'm using mysqli_* throughout. I'm fairly new to PHP, and I have never written a function before. I figure something like this would be out there somewhere, but I haven't been able to find an example here at PHPFreaks, nor on various other forums. Here are some examples of what I have found using mysql_*: http://www.barattalo.it/2010/01/19/php-to-get-enum-set-values-from-mysql-field/ http://stackoverflow.com/questions/3715864/displaying-mysql-enum-values-in-php http://www.larryullman.com/forums/index.php?/topic/916-use-data-type-enum-for-form-drop-down-options/ http://www.pcserviceselectronics.co.uk/php-tips/enum.php I just don't know where to start with creating this function. I need to use this 3 times, or 2 different fields, which is why I assumed a function would be the best way to go. Thanks for any help!
  2. mySQL version:5.5.24 I need help with the column type ENUM. What I want to happen is for this column to get either yes or no values. I think ENUM is used specifically for this but i dont know how to set up the column for this to work. I tried to just select ENUM as the type and leave everything else blank but when I save it gives me the error "This is not a number". I have other columns, but im almost sure the error is coming from the ENUM column. Please help.
×
×
  • 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.