Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: DBI mysql truncation best practice?

by CountZero (Bishop)
on Mar 24, 2006 at 22:25 UTC ( #539111=note: print w/replies, xml ) Need Help??


in reply to DBI mysql truncation best practice?

Fom the MySQL 5.x docs:
If you assign a value to a CHAR or VARCHAR column that exceeds the column's maximum length, the value is truncated to fit. If the truncated characters are not spaces, a warning is generated. For truncation of non-space characters, you can cause an error to occur (rather than a warning) and suppress insertion of the value by using strict SQL mode. See Section 5.2.5, “The Server SQL Mode”. (11.4.1. The CHAR and VARCHAR Types)

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

  • Comment on Re: DBI mysql truncation best practice?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://539111]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-01-21 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (186 votes). Check out past polls.