You are here:  » Character Limit in Category Mapping (Alternatives) field?


Character Limit in Category Mapping (Alternatives) field?

Submitted by Convergence on Thu, 2012-05-17 05:10 in

Greetings,

Have a category that is large. Today we ran into a roadblock with our Category Mapping. Can't go past 66813 characters.

However, we can't find anything in the database that would limit the number of characters or words as it's just a text field.

Any thoughts?

Thanks!

Submitted by support on Thu, 2012-05-17 08:52

Hi,

By default the MySQL TEXT type has a maximum size of 65K, so this would need to be changed to MEDIUMTEXT (16M) or LONGTEXT (4GB). No problem, the following dbmod.php (run from main Price Tapestry installation folder) will convert the field - I would recommend running a database back-up first using the Database Tool in /admin/...

<?php
  
require("includes/common.php");
  
$sql "ALTER TABLE `".$config_databaseTablePrefix."categories`
            CHANGE `alternates` `alternates` LONGTEXT"
;
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

Cheers,
David.
--
PriceTapestry.com

Submitted by Convergence on Thu, 2012-05-17 14:57

Hello David,

Thank you - worked like a charm.

Psst, small type above: "cateogories'

:)

Thanks, again - Just love learning something new!

Submitted by support on Thu, 2012-05-17 15:01

Ooops - correct above - thanks!

Cheers,
David.
--
PriceTapestry.com