Conjurer Posted October 20, 2003 Share Posted October 20, 2003 I am trying to set up a table using PHP Admin at my webhost. The tutorial I was looking at used a db.sql file that contained the following: first_name varchar(25) NOT NULL default \'\', last_name varchar(25) NOT NULL default \'\', email_address varchar(25) NOT NULL default \'\', So in phpAdmin I set up the Field Type and Length okay and left the one field set to \"Not Null\". I am confused though about what to do in the Default column. Do I just leave it blank? Or do I need to literally type \' \' with the quotes and all? Also what are the other attributes binary and unsigned for? And when would you use the extra column other than for autoincrementing? Quote Link to comment https://forums.phpfreaks.com/topic/1195-php-admin-not-null-questions/ Share on other sites More sharing options...
wolf Posted October 22, 2003 Share Posted October 22, 2003 I would use DEFAULT values but I\'m not sure if it\'s the best solution. I could tell you that UNSIGNED will duplicate your number expression f.e. TINYINT -128 to 127. TINYINT UNSIGNED 0 to 255. SAMLLINT -32768 to 32767. SAMLLINT UNSIGNED 0 to 65535. MEDIUMINT -8388608 to 8388607. MEDIUMINT UNSIGNED 0 to 16777215. f.e. TINYINT ---> 1 TINYINT ZEROFILL ---> 001 BINARY works for CHAR OR VARCHAR f. e. Without BINARY hello = HELLO bye = BYE with BINARY hello != HELLO bye != BYE I know only the AUTO_INCREMENT option for extra column. Sorry if my english isn\'t good enough, i speak spanish and i lost a little practice speaking english. Good luck Quote Link to comment https://forums.phpfreaks.com/topic/1195-php-admin-not-null-questions/#findComment-4039 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.