I'm collecting data from a form and populating the db with it.
mysql> describe titles;
+----------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra
+----------+---------------------+------+-----+---------+----------------+
| MovieID | int(10) unsigned | NO | PRI | NULL | auto_increment
| Title | varchar(100) | NO | | NULL |
| Year | year(4) | NO | | 0000 |
| Comment | tinytext | YES | | NULL |
| CaseNum | tinyint(3) unsigned | YES | | NULL |
| Director | varchar(50) | YES | | NULL |
| Genre | varchar(15) | YES | | NULL |
| Language | char(3) | YES | | NULL |
| Actor | varchar(50) | YES | | NULL |
+----------+---------------------+------+-----+---------+----------------+
If I only enter a new movie title, leaving the rest of the fields blank,
my script throws an error:
Out of range value adjusted for column 'Year' at row 1
My Perl code for the above action:
my $sql=qq{INSERT INTO titles
(Title,Director,Actor,Genre,Language,CaseNum,Year,Comment)
VALUES
("$Title","$Director","$Actor","$Genre","$Language",$CaseNum,$Year,"$Notes")};
I'm stumped by the 'out of range' error. Anyone shed some light on this?
--
Amer Neely - Web Mechanic
w: www.webmechanic.softouch.on.ca/
e: [EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]