PDA

View Full Version : truncate location and signature?


underdog
05-10-2004, 05:21 PM
hi there,

i recently reduced the number of allowed characters for the location and signature fields which has restricted the number of characters for new or changed entries but not for the existing ones. is there a way to truncate the existing entries at the new character limit?

thanks very much,

carolyn

underdog
05-12-2004, 02:50 AM
passing along what i figured out this evening in case it is of use to anyone else.

these statements work with version 3, they blank out the field entries that are over a certain length for the signature and for one of the customizable profile fields (in this case field2):

SELECT signature
FROM usertextfield
WHERE LENGTH(signature)>250

UPDATE usertextfield SET signature = ""
WHERE LENGTH(signature)>250

**********

SELECT userid, field2
FROM userfield
WHERE LENGTH(field2)>25

UPDATE userfield SET field2 = ""
WHERE LENGTH(field2)>25

filburt1
05-12-2004, 02:57 AM
Note that those queries erase it for every usergroup...including you if your signature is above 250 chars.