[Firebug-cvs] firebug/web/postgres connect.php,1.1,1.2 db_create.php,1.1,1.2
Brought to you by:
doolin
From: Kevin <kar...@us...> - 2004-08-19 17:37:15
|
Update of /cvsroot/firebug/firebug/web/postgres In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18150 Modified Files: connect.php db_create.php Log Message: Added some comments to some of the files for the psql version of the database. Index: connect.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/postgres/connect.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** connect.php 19 Aug 2004 16:27:38 -0000 1.1 --- connect.php 19 Aug 2004 17:37:04 -0000 1.2 *************** *** 2,6 **** /** Function connect_postgres takes in a database name, and returns the ! * database handle. */ function connect_postgres($db) { --- 2,7 ---- /** Function connect_postgres takes in a database name, and returns the ! * database handle. Note that the user, host, and port should be adjusted ! * to match those of the particular postmaster server being used. */ function connect_postgres($db) { Index: db_create.php =================================================================== RCS file: /cvsroot/firebug/firebug/web/postgres/db_create.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** db_create.php 19 Aug 2004 16:27:38 -0000 1.1 --- db_create.php 19 Aug 2004 17:37:04 -0000 1.2 *************** *** 15,18 **** --- 15,19 ---- <?php include("connect.php"); + /* Note: All database names are lower-case in postgresql.*/ $dbname = strtolower($HTTP_POST_VARS["dbname"]); $nummotes = $HTTP_POST_VARS["nummotes"]; *************** *** 28,31 **** --- 29,33 ---- */ + /* Check to see if database exists already. */ $dbh = connect_postgres("template1"); $statement = "SELECT DATNAME FROM pg_database where not datname='template1' and not datname='template0'"; *************** *** 45,48 **** --- 47,51 ---- } + /* Creates the database if it does not exist yet.*/ if (!$flag) { $dbh = connect_postgres("template1"); |