English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

hi. i need help with understanding the field 'types' in phpMyAdmin. the definitions in their resource page is confusing for me. i need to find out what field type i should use for the following:
- text field with 25 characters
- date field
- a radio button in my form

the radio button i have in my form is a simple "male" or "female" button which the visitor must choose just one. what type of field & value in my database do i use for that?

thanks.

2006-11-22 06:02:19 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

In PHPMyAdmin set the datafields to the following types:

Text field with 25 characters = varchar(25)
Date field = date
Radio button = char(1)

Cheers!

2006-11-22 06:49:55 · answer #1 · answered by Chris B 4 · 0 0

tinyint
assign yoru radio button for male as a value of 1
assign your radio button fore female as a value of 2
when you do your query to retrieve the data from your database, you know that if you choose all rows with 1 in that field, that it will only display those who are males.

etc

2006-11-22 14:19:00 · answer #2 · answered by arus.geo 7 · 0 1

fedest.com, questions and answers