Commit 163360ae authored by Manfred Kutas's avatar Manfred Kutas

ZP-230 Changed config to use separate parameters for the engine, server,

port and database. Changed the code to match that. Added checks for the
database and table creation if they not exist. Fixed comments.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 32bc5ff0
...@@ -43,14 +43,19 @@ ...@@ -43,14 +43,19 @@
************************************************/ ************************************************/
/** /**
* DSN: formatted PDO connection string * DON'T FORGET TO INSTALL THE PHP-DRIVER PACKAGE!!!
* mysql:host=xxx;port=xxx;dbname=xxx * STATE_SQL_ENGINE: the DB engine
* DON'T FORGET TO INSTALL THE PHP-DRIVER PACKAGE!!! * STATE_SQL_SERVER: the DB server URI or IP
* USER: username to DB * STATE_SQL_PORT: the DB server port
* PASSWORD: password to DB * STATE_SQL_DATABASE: the DB name
* OPTIONS: array with options needed * STATE_SQL_USER: username to DB
* STATE_SQL_PASSWORD: STATE_SQL_USER's password to DB
* STATE_SQL_OPTIONS: array with options needed
*/ */
define('STATE_SQL_DSN', ''); define('STATE_SQL_ENGINE', 'mysql');
define('STATE_SQL_USER', ''); define('STATE_SQL_SERVER', 'localhost');
define('STATE_SQL_PORT', '3306');
define('STATE_SQL_DATABASE', 'zpushstates');
define('STATE_SQL_USER', 'root');
define('STATE_SQL_PASSWORD', ''); define('STATE_SQL_PASSWORD', '');
define('STATE_SQL_OPTIONS', serialize(array(PDO::ATTR_PERSISTENT => true))); define('STATE_SQL_OPTIONS', serialize(array(PDO::ATTR_PERSISTENT => true)));
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment