On Tue, 06 Mar 2001 09:18:34 -0600, "Gerald L. Clark"
<[EMAIL PROTECTED]> wrote:
Gerald,
>>Try giving a number instead of a string as a default for an int.
>>
Not sure I follow, it is a number??
>>"MikeBlezien" wrote:
>>>
>>> Hello All,
>>>
>>> I've created a table(using MySQL 3.23.33), using default values:
>>>
>>> DROP TABLE IF EXISTS referral;
>>> CREATE TABLE referral (
>>> refer_id int(10) UNSIGNED DEFAULT '100' NOT NULL,
>>> refer_fname varchar(20) DEFAULT '' NOT NULL,
>>> refer_lname varchar(20) DEFAULT '' NOT NULL,
>>> refer_email varchar(40) DEFAULT '' NOT NULL,
>>> UNIQUE INDEX idx_refid (refer_id)
>>> ) TYPE=MYISAM;
>>>
>>> It creates the table, no problems. But for some reason, if the refer_id is left
>>> blank during an INSERT, it defaults to "0" and not 100 ?? is this because of the
>>> UNIQUE INDEX on this column?? If your wonder, the refer_id is assigned a random
>>> 5 digit number within the Perl program. I was just testing to see if it would
>>> assign the default value if no value was assigned during an insert.
Mike(mickalo)Blezien
========================================
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225) 686-2002
=========================================
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php