What steps will reproduce the problem?
--------------------------------------
1. Installing according to read-me instructions
What is the expected output? What do you see instead?
-----------------------------------------------------
The database.php script creates tbl_users with several columns listed as not
null but no default given. This throws an error on some installations (It did
on my WAMP local installation but not on the host I use). One work around on
the web suggests modifying the fields to be null by default. This generally
corrects the problem but if the self-registration option is used the client
will not appear in the clients table because the 'level' field is listed as
null. My suggested change is below (based off the change I found on the web
with a default of 0 added for level.
$q3 = '
CREATE TABLE IF NOT EXISTS `tbl_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user` varchar('.MAX_USER_CHARS.') NOT NULL,
`password` varchar(32) NOT NULL,
`name` text NOT NULL,
`email` varchar(60) NOT NULL,
`level` tinyint(1) NOT NULL DEFAULT 0,
`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP(),
`address` text COLLATE latin1_general_ci default NULL,
`phone` varchar(32) COLLATE latin1_general_ci default NULL,
`notify` tinyint(1) default NULL,
`contact` text COLLATE latin1_general_ci default NULL,
`created_by` varchar('.MAX_USER_CHARS.') default NULL,
`active` tinyint(1) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
';
I am not a SQL expert, so please review.
What version of the product are you using? On what operating system?
--------------------------------------------------------------------
Release R412 on 64-bit Windows 7 Professional using WAMP Server 2.4 (Apache
v2.4.4,PHP 5.4.12, and MySQL 5.6.12, default package install) and interacting
with Firefox 23.0.1.
Also
Web host using some linux version, PHP 5.2, MySQL v5.5.33
Please provide any additional information below.
------------------------------------------------
??
Original issue reported on code.google.com by SimonAGo...@gmail.com on 12 Sep 2013 at 4:13
Original issue reported on code.google.com by
SimonAGo...@gmail.com
on 12 Sep 2013 at 4:13