Keep It Simple, Stupid | |
PerlMonks |
Re: Mysql smallint out of range. How to fetch warning?by tinita (Parson) |
on Oct 16, 2010 at 22:30 UTC ( [id://865739]=note: print w/replies, xml ) | Need Help?? |
IMHO it might be even better to forbid mysql to do that insert at all. if you turn to strict mode, the insert will fail and output a warning. with the "RaiseError" option on, it will die:
Then you can be sure to not get wrong data inserted, but you have to put an eval block around it to catch the error.
In Section
Seekers of Perl Wisdom
|
|