In developing a shopping cart application I\'ve found that I needed to save settings and configurations based on the administrator\'s preferences and requirements. This info
Sorry I come like, yeaars later. But anyways, what I do is simple and effective. I simply create a table with three () columns:
ID - int (11)
name - varchar (64)
value - text
What I do before creating a new config column, updating it or reading is to serialize the "value"! This way I am sure of the type (Well, php is :) )
For instance:
b:0; is for BOOLEAN (false)
b:1; is for BOOLEAN (true)
i:1988; is for INT
s:5:"Kader"; is for a STRING of 5 characters length
I hope this helps :)