[geeklog-devel] Strange storage of strings (and other data) in gl_conf_values
joe at ThrowingDice.com
Mon Mar 3 13:44:53 EST 2008
At 01:14 PM 3/3/2008, Blank, Jessica wrote:
> I am working to port my LDAP authentication class to the
> latest (as of today, Monday, 3/3/2008) CVS version of geeklog. In
> the process, I noticed something odd in the database. In
> gl_conf_values, strings aren't stored as 'foo', they're stored like
> 's:3:"foo";', where 3 is the length of the string 'foo'.
> Why is this done? It seems unnecessary. Can't the length of
> a string be determined with a simple strlen()?
gl_conf_values can store anything so everything is serialize'd before
storage. You should not do any queries against gl_conf_values. You
should be using $_CONF['whatever'] to reference configuration data
like you do in 1.4.1.
Throwing Dice Games
More information about the geeklog-devel