NavigationUser login |
Drupal Database Table VariableIn my previous post, Problem with Gallery Module for Drupal, I mentioned my need to modify data in the Drupal database table "variable". I learned the hard way the significants of the metadata contained in this table. The table "variable" has two columns: name and value. The value field contains metadata indicating the type of data contained in the field. In my case gallery_embed_uri was: s:26:"/test1/index.php?q=gallery"; The s:26 means string with a length of 26. So when I changed "test1" to "blog", I needed to also change "s:26" to "s:25" reflecting the shorter string length. Not doing so caused Drupal to fail in spectacular ways without good error messages. I'm sure there is a reason for storing the length with the string value in the database, but I have not been able to find it online. Other metadata types are outlined after the jump. The metadata I have in my "variable" table is:
a:<size>:{<data>}; Boolean
b:<value>; Integer
i:<value>; String
s:<length>:"<string>"; Unknown
d:<value>;
Submitted by steven on Tue, 04/01/2008 - 02:52. categories [ ]
Reply |