Create a sql table like this:
CREATE TABLE `userpref` (
`prefid` int(11) unsigned NOT NULL auto_increment,
`username` varchar(100) NOT NULL default '',
`preference` varchar(30) NOT NULL default '',
`value` varchar(100) NOT NULL default '',
PRIMARY KEY (`prefid`)
) TYPE=MyISAM;
INSERT INTO `userpref` VALUES
(1,'@GLOBAL','use_bayes','1');
INSERT INTO `userpref` VALUES
(3,'@GLOBAL','bayes_auto_learn','1');
INSERT INTO `userpref` VALUES
(4,'@GLOBAL','use_bayes_rules','1');
INSERT INTO `userpref` VALUES
(24,'@GLOBAL','fold_headers','1');
INSERT INTO `userpref` VALUES
(38,'@GLOBAL','add_header','all Level _STARS(X)_');
INSERT INTO `userpref` VALUES
(81,'@GLOBAL','report_safe','0');
INSERT INTO `userpref` VALUES
(80,'@GLOBAL','required_score','5');
This is a basic table. I use this on my setup and it works
well.
Jonn
On Sun, 12 Feb 2006 18:38:21 +0200
"Raimonds Aronietis" <[EMAIL PROTECTED]> wrote:
Hi,
I am trying to make a sql-based per user setup of
preferences and want to
ask if anyone knows how the entries in mysql table
should be made correctly.
I have not been able to find corresponding
documentation. :(
There are two possible ways and I am in doubt which is
correct:
1.
user pref value
aaa whitelist_from [EMAIL PROTECTED]
aaa whitelist_from [EMAIL PROTECTED]
aaa ok_locales en
aaa ok_locales de
aaa ok_locales ru
or
2.
user pref value
aaa whitelist_from [EMAIL PROTECTED] [EMAIL PROTECTED]
aaa ok_locales en de ru
Should boath work for all prefferences or there is only
one correct way of
creating the entries in the table?
By the way there are also size limitations for number of
symbols per
database cell.
I hope that somone has encountered this problem already
and can help!
Best reguards,
Raimonds Aronietis