Quick start


  1. There is no installation required.
    Extract the zipfile and put the extracted folder "datagenerator" in your local webfolder.
    For most Windows users that is the `htdocs` folder (e.g. D:/xampp/htdocs) because that is the default when you install XAMPP.
    For Linux users the webfolder is probably `/var/www` or `/home/www`, you can find the correct folder in `/etc/httpd/conf/httpd.conf` or `/etc/apache2/sites-available/default` when you installed LAMPP.
  2. That's all you have to do when you have a default webserver installation like XAMPP already installed.
    The only thing you have to check are the mysql serversettings. Normally the SERVER_USER is `root` and the SERVER_PASS is '' (two quotes). When you changed these when you installed XAMPP you have to change them in `/config/config.php`. You can find the SERVER_USER, SERVER_HOST (mostly `root@localhost`) and SERVER_PASS in phpmyadmin.
    The rest of the constants in config.php have correct default values and you can change them optionally, like your preferred applicationlanguage (LANGUAGE) and your preferred landspecific language (QUERYLANGUAGE).
  3. Make sure the folders `templates_c` and `/misc/saved` are writable.
  4. When you are using Linux you have to set the permissions of the folders and the files correct. Set owner to 'nobody' and the group to 'nogroup'. At least the `classes` and `misc` folder.
  5. That's all, now typ "localhost/datagenerator" in your browser and start generating data.

So, only 3 steps for most users:
Extract the zipfile and put the extracted folder "datagenerator" in your local webfolder.
Make sure the folders `templates_c` and `/misc/saved` are writable.
Typ "localhost/datagenerator" in your browser and start generating data.

 

Config options [OPTIONAL] at the bottom of this page.

Choose a database

First you have to choose a local database from the dropdownlist (Or choose a saved configfile you saved earlier).

The following databases are not included in the dropdownlist to prevent accidentally changing: 'information_schema', 'mysql','webauth' and 'phpmyadmin'.


Or a saved configfile

You can open a configfile which you saved earlier.

In the maingrid you can save a configuration by clicking on the 'save this configuration' button.


Optionally adjust the credentials

When your database has a custom username and password, you can fill them in here. Otherwise leave the username to 'root' and the password empty.

Select the tables

Now you can select the tables in which you want to add one or more rows of data.

And click 'continue'.
 

The application automatically sets default values. Sometimes however it can be handy to have real-like data in your database.
That can be useful for testing `sorting` functions, for viewing the look and feel of a website, checking if functions which do some math are working as you expect etc.

 

To set custom options you can choose an option in the combo...

 

... or define your own values...

 

... or set a range

These are the options:

 

... or select a field from a table in the same_as column ...

 

With the refresh button you can see the effect of your changes in the `example values` column.

After you are satisfied with the example values in the `example values` column you can export the data to text or import in the database immediately.

 

Don't change the paths !

     // don't change these paths
     define('ROOTFOLDER',            $_SERVER['DOCUMENT_ROOT']);
     define('DATAGENERATOR_DIR',     ROOTFOLDER.'/datagenerator');
     define('EXTERNAL_DIR',          DATAGENERATOR_DIR.'/external');     // ExtJS en Smarty
     define('CLASSES_DIR',           DATAGENERATOR_DIR.'/classes');
     define('LIB_DIR',               DATAGENERATOR_DIR.'/lib');

     // default url to datagenerator
     define('DATAGENERATOR_URL',     'http://localhost/datagenerator');

     // don't change this
     define('EXTERNAL_URL',          DATAGENERATOR_URL.'/external');

 

Normally the server settings are correct, but when you set a user and password you have to edit them.

     // mysql server settings, you can find user and host on the first page in phpmyadmin
     define('SERVER_HOST', 'localhost');
     define('SERVER_USER', 'root');
     define('SERVER_PASS', '');

 

Language options

     // application language. use NL (Dutch), DE (German) or EN (English)
     define('LANGUAGE', 'EN');

     // for landspecific data. use: NL (Netherlands), DE (Germany), EN (Great Britain) or US (USA)
     define('QUERYLANGUAGE', 'US');       

 

[OPTIONAL]; the default values are sufficient for working with the application.

     // set to true if you want the application to remember the width of columns in the maingrid
     define('MAINGRID_STATEFUL', false);

     // set to true if you want to get the current tablestructure before every refresh or export 
     define('GET_TABLESTRUCTURE_EVERYTIME', false);

     // set the amount of values you want to put in a session to use for the foreign keys 
     define('AMOUNT_LINKEDTABLEVALUES_IN_SESSION', 50);

     // a number minimum 3 or 'always' to use the default value every time.
     // If you set it to 'always' custom options or ranges won't be used.
     // This setting is ignored when the field is a foreign key or a unique key.
     define('INSERT_DEFAULT_VALUE_EVERY_X_TIMES', 5);

     // a number minimum 3 or 'always' to use the NULL every time.
     // If you set it to 'always' custom options or ranges won't be used.
     // This setting is ignored when the field is a foreign key or a unique key.
     define('INSERT_NULL_VALUE_EVERY_X_TIMES', 5);

     // `,` or `.` as decimal seperator in case of floats and decimals
     define('DEC_SEPERATOR', ',');

     // `,` or `.` as thousands seperator in case of floats and decimals
     define('THOUSANDS_SEPERATOR', '.');

     // the datatypes you want to be preselected in the datatypes combo
     define('PRESELECTED_DATATYPES', 'varchar,char,text,int,smallint,mediumint,tinyint,date,time,datetime');

	 // true or false, set to true if you want to be able to set a custom value (one of the enumvalues)
     define('ALLOW_CUSTOM_ENUMS', false);

     // true or false, set to true if you want to be able to change the tables selection of a saved config file
     define('ALLOW_CHANGING_TABLESELECTION_OF_SAVEDFILE', false);

     // true or false, set to true if you want to be able to undo the last db import
     define('ALLOW_TO_ROLLBACK_LAST_INSERTED_ROWS', false);

	 // 500 or 1000, 500 is the default setting     // in near future->  runtime_dbcheck
     define('AMOUNT_ROWS_TO_FETCH', 500);


// set to true if you want to include the errors in the insertqueries in the text queries (new tab). define('INCLUDE_ERRORS_IN_NEWTAB_QUERIES', true); // set to true if you want to include the errors in the insertqueries in the saved SQL file. define('INCLUDE_ERRORS_IN_SAVED_SQL', true); // set to true if you want to fix 'maxlength exceeded' errors on varchar or char columns // by truncating the string in the insertquery, so there is no error. define('TRUNCATE_STRING_TO_AVOID_MAXLENGTH_ERROR', true); // set to true if you want to remove errorparts in an insertquery and try to execute the insertquery // without the specific column (in which the error is) in the insertquery. define('REMOVE_ERRORPARTS_IN_DBIMPORT_QUERIES_AND_TRY_TO_IMPORT', false);