Membership Saved Searches MySQL Error: Data too long for column

By Mikey - November 4, 2011 - edited: November 4, 2011

Today while testing an install for Membership Saved Searches I decided to see what would happen if someone entered a very long name for a saved search and when I did I got the following message.

Error: MySQL Error: Data too long for column 'name' at row 1
(at websiteSavedSearches.php line 128)

Prevent this page from creating additional dialogs


The long test message was:

This very long message is to test how long a saved search name can be. This very long message is to test how long a saved search name can be. This very long message is to test how long a saved search name can be. This very long message is to test how long a saved search name can be. This very long message is to test how long a saved search name can be.

I tried editing the Website Saved Searches section editor record "Search Name" to limit the amount of characters using "Max Length", but that didn't seem to resolve the issue.

I know this is ridiculously long for a saved search name and it's highly unlikely anyone would ever save a search with such a name. But is it possible to set a limit on the amount of characters that can be entered into the name filed for saved searches?

Anyone have any suggestions?
If I check the (Prevent this page from creating additional dialogs) box will this resolve the issue for anyone who is logged into the site? OR only resolve the issue for me?

Thanks Zick

Re: [zick] Membership Saved Searches MySQL Error: Data too long for column

By Dave - November 8, 2011

And you can also set maxlength="255" on your <input ... > field to prevent the user from entering more than 255 chars.
Dave Edis - Senior Developer
interactivetools.com