1. Installing the database tables
1.1. Introduction
One of the most frequently asked questions by Dreamweaver Developer Toolbox newbies on the ADDT forums is :: what the heck is the required structure of ADDT´s login tables supposed to be like, and how do I set this thing up ? Regretfully the current ADDT helpfile does leave folks in the dark about this, so here´s a complete SQL dump for you to use with your favorite database management tool like e.g. phpMyAdmin:
CREATE TABLE `login` (
`id` int(3) unsigned NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`password` varchar(70) NOT NULL default '',
`email` varchar(150) NOT NULL default '',
`active` tinyint(4) NOT NULL default '1',
`level` int(2) NOT NULL default '0',
`random_key` varchar(200) default NULL,
`login_attempts` smallint(6) NOT NULL default '0',
`disable_date` datetime NOT NULL default '0000-00-00 00:00:00',
`registration_date` datetime NOT NULL default '0000-00-00 00:00:00',
`expiration` int(11) NOT NULL default '100',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
CREATE TABLE `login_stats` (
`id` int(11) NOT NULL auto_increment,
`id_log` int(11) NOT NULL default '0',
`ip_log` varchar(15) NOT NULL default '',
`last_logindate_log` datetime NOT NULL default '0000-00-00 00:00:00',
`last_activitydate_log` datetime default NULL,
`session_log` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
As you might note, the abovementioned columns have on purpose been widely named according to the various dropdown menus available from within ADDT´s Login Settings (see "Control Panel") -- this should enable you to instantly assign the corresponding table columns without having to wonder what belongs where ;-)
1.2. some notes on the provided SQL script:
- this SQL dump will exclusively work for a MySQL database, means you will have to setup the table columns manually when using a different
DBMS -- doing this shouldn´t be too hard nonetheless, as e.g. Microsoft Access users should be able to understand the meaning of terms like "varchar", "int" just fine. - the given column names are safe and will work, it´s been successfully tested a 1000 times. If you really need to rename the columns to something else, just go ahead -- but you need to be aware of one particular pitfall :: a column named user will definitely be messing up ADDT´s configuration file, because this very term happens to be (a yet undocumented "feature") one of Dreamweaver´s "reserved words" that´s internally used for other stuff and will lead to a naming conflict.
- it doesn´t use any fancy stuff like "collations" or (in this context certainly needless) character set definitions, means it will install just fine on older versions like 3.23.xx. If you´re not using the "MyISAM" type at all, please change this after installing the tables.
- the "login_stats" table is only required respectively supported when using ADDT´s PHP_MYSQL server model. The same goes for the last four columns (login_attempts, disable_date, registration_date, expiration) of the main "login" table, which are mapped to the "Restrictions" tab and are currently only available on PHP_MYSQL as well
- in case you´re planning to use the "Encrypt Password" option (see the "Options" tab), your login table´s "password" should definitely provide a "varchars" value of 32 chars. As ADDT is using the
MD5 encryption of passwords, defining a lower varchars value will be truncating the encrypted password. - ColdFusion users: when loading the login table, Dreamweavers (including the CS3 version) will confront you with a funny bug which makes it return the warning message - "sql type not recognized: int unsigned" -- what does it mean ?
According to my fellow Community Expert Ken Ford´s reply on this forum: "That is usually caused by your MySQL table having a field with a int type and an unsigned attribute. DW just does not recognize the unsigned attribute. If you want it to stop, just removed the unsigned attribute from the field in the database" -- which in our case in the "id" column. Thanks Ken :-)
1.3. Installing the tables with phpMyAdmin
Any halfways feasible database administration tool installed on your local or remote server should provide an "insert SQL data" feature -- the following example is based on the popular
phpMyAdmin that´s usually available on ordinary PHP/Apache hosts
a) open phpMyAdmin and click the SQL icon usually located on top of the left frame:
![]()
b) the subsequently opened browser window will display a blank textarea awaiting some input. Just paste the provided SQL dump in here...

... and confirm with OK to get the tables installed. That´s all there is to do, phpMyAdmin´s list of installed tables will now refresh and display the newly installed login tables.
2. Configuring the Login settings
Now that the login tables have been added to your database, it´s time to to configure ADDT´s Login settings:
a) open ADDT´s Control Panel
b) click the "Login settings" button
c) click the "Database" tab and specify the "database information" as displayed next:

d) PHP_MYSQL server model only: click the "Restrictions" tab and specify the "login policy" and "account expiration settings" as displayed next:

e) PHP_MYSQL server model only: click the "History" tab and specify the "user history options" as displayed next:
This tutorial and all related material (files, images etc) are licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Contact:
info @ guenter-schenk.com